element ui 的 el-tab 当使用 router-view 时 mounted 执行了多次

之前参照很多文章修改试图修正这个问题,结果都徒劳,终于让我找到 参考

我做了如下修改,主页面 main.vue

                <el-tabs v-if="tabbar.tabs.length > 0" style="margin:5px;height:99%"
                      v-model="tabbar.active" type="border-card" closable @tab-remove="removeTab"
                      ref='rootTabs'
                      @tab-click="onClickTabsItem">
                <el-tab-pane v-for="item in tabbar.tabs"
                              :key="item.menu_id"
                              :label="item.menu_name"
                              :name="item.menu_name" style="position: relative;">
                  <span v-if="item.menu_name!=='首页' && item.window_maximize === windowMaximize.允许" slot="label">{{item.menu_name}}
                    <i class="el-icon-full-screen" @click="fullScreen"></i>
                  </span>
                  <span slot="label" v-if="item.menu_name!=='首页' && tabbar.tabs && Array.isArray(tabbar.tabs)  && tabbar.tabs.length > 2">{{item.menu_name}}
                    <el-tooltip
                      content="关闭所有窗口"
                      placement="top"
                      effect="light">
                      <div slot="content" style="font-size:15px">
                        <svg t="1667882396181" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1814" width="18" height="18"><path d="M352 800H272A48 48 0 0 1 224 752V672H144A48 48 0 0 1 96 624v-480A48 48 0 0 1 144 96h480A48 48 0 0 1 672 144V224h80A48 48 0 0 1 800 272V352h80a48 48 0 0 1 48 48v480a48 48 0 0 1-48 48h-480a48 48 0 0 1-48-48V800z" fill="#FFFFFF" p-id="1815"></path><path d="M192 640v32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32v64h-32V128H128v512h64z" fill="#B7BEC8" p-id="1816"></path><path d="M320 768v32H256a32 32 0 0 1-32-32V256a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32v64h-32V256H256v512h64z" fill="#808FA1" p-id="1817"></path><path d="M608 896v32h-224a32 32 0 0 1-32-32V384a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32v224h-32v-224H384v512h224z" fill="#5D6D7E" p-id="1818"></path><path d="M704 672h224a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32h-224a32 32 0 0 1-32-32v-224a32 32 0 0 1 32-32z m162.272 149.024l67.872-67.872-45.248-45.28-67.872 67.904-67.872-67.904-45.28 45.28 67.904 67.84-67.904 67.904 45.28 45.248 67.84-67.84 67.904 67.84 45.248-45.248-67.84-67.872z" fill="#EF633F" p-id="1819"></path></svg>
                          关闭其他所有选项卡  
                      </div>
                      <i  @click.stop="removeOtherTabs(item)">
                        <svg t="1667882396181" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1814" width="14" height="14"><path d="M352 800H272A48 48 0 0 1 224 752V672H144A48 48 0 0 1 96 624v-480A48 48 0 0 1 144 96h480A48 48 0 0 1 672 144V224h80A48 48 0 0 1 800 272V352h80a48 48 0 0 1 48 48v480a48 48 0 0 1-48 48h-480a48 48 0 0 1-48-48V800z" fill="#FFFFFF" p-id="1815"></path><path d="M192 640v32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32v64h-32V128H128v512h64z" fill="#B7BEC8" p-id="1816"></path><path d="M320 768v32H256a32 32 0 0 1-32-32V256a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32v64h-32V256H256v512h64z" fill="#808FA1" p-id="1817"></path><path d="M608 896v32h-224a32 32 0 0 1-32-32V384a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32v224h-32v-224H384v512h224z" fill="#5D6D7E" p-id="1818"></path><path d="M704 672h224a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32h-224a32 32 0 0 1-32-32v-224a32 32 0 0 1 32-32z m162.272 149.024l67.872-67.872-45.248-45.28-67.872 67.904-67.872-67.904-45.28 45.28 67.904 67.84-67.904 67.904 45.28 45.248 67.84-67.84 67.904 67.84 45.248-45.248-67.84-67.872z" fill="#EF633F" p-id="1819"></path></svg>
                      </i>
                    </el-tooltip>
                  </span>
                  <keep-alive>
                    <router-view :name="item.menu_component" :ref="item.menu_component"></router-view>
                  </keep-alive>
                </el-tab-pane>
              </el-tabs>

之前参考某文章把 router-view 放在 el-tab-pane 外面都不起作用,问题根本不是出在 el-tab-pane,而是v-for 里面有多个route-view,keep-alive 时 tab 并未销毁掉,而是缓存隐藏了起来。需要把 router-view 的 name 与路由的 index.js 名称对应起来

import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
// 组件存放的路径使用按需加载,webpack 打包时会分隔成单独的js文件,不会全部打包到 app.js 文件下面
export default new Router({
  mode: 'history',base: process.env.BASE_URL,routes: [
    {
      path: '/',name: 'Login',component: resolve => require(['@/pages/LoginV2'],resolve)
    },{
      path: '/Main',name: 'Main',component: resolve => require(['@/pages/main'],resolve),children:[       
        {
          name:'Home',path:'Home',components: {Home:() => import('@/pages/Home')}
        },{
          path: 'Driver',name: 'Driver',components: {Driver:() => import('@/pages/Driver')}
        },{
          path: 'ItemOther',name: 'ItemOther',components: {ItemOther:() => import('@/pages/ItemOther')}
        },{
          path: 'Role',name: 'Role',components: {Role:() => import('@/pages/Role')}
        },{
          path: 'Supplier',name: 'Supplier',components: {Supplier:() => import('@/pages/Supplier')}
        },{
          path: 'User',name: 'User',components: {User:() => import('@/pages/User')}
        },{
          path: 'Button',name: 'Button',components: {Button:() => import('@/pages/Button')}
        },{
          path: 'Menu',name: 'Menu',components: {Menu:() => import('@/pages/Menu')}
        },{
          path: 'SiloWatchTimeOption',//筒仓排班时间信息设置
          name: 'SiloWatchTimeOption',components: {SiloWatchTimeOption:() => import('@/pages/SiloWatchTimeOption')}
        },{
          path: 'SiloMonitorReport',//筒仓日报表
          name: 'SiloMonitorReport',components: {SiloMonitorReport:() => import('@/pages/SiloMonitorReport')}
        },{
          path: 'GlobalParameters',name: 'GlobalParameters',components: {GlobalParameters:() => import('@/pages/GlobalParameters')}
        },{
          path: 'PurchaseOrder',name: 'PurchaseOrder',components: {PurchaseOrder:() => import('@/pages/PurchaseOrder')}
        },{
          path: 'Vehicle',name: 'Vehicle',components: {Vehicle:() => import('@/pages/Vehicle')}
        },{
          path: 'PurchaseReport',name: 'PurchaseReport',components: {PurchaseReport:() => import('@/pages/PurchaseReport')}
        },{
          path: 'OperationKanBan',name: 'OperationKanBan',components: {OperationKanBan:() => import('@/pages/kanban/OperationKanBan1')}
        },{
          path: 'TankDataKanBan',name: 'TankDataKanBan',components: {TankDataKanBan:() => import('@/pages/kanban/TankDataKanBan')}
        },{
          path: 'StoveTowerKanBan',//烘干塔看板
          name: 'StoveTowerKanBan',components: {StoveTowerKanBan:() => import('@/pages/kanban/StoveTowerKanBan')}
        },{
          path: 'SaleReport',name: 'SaleReport',components: {SaleReport:() => import('@/pages/SaleReport')}
        },{
          path: 'SaleOrder',name: 'SaleOrder',components: {SaleReport:() => import('@/pages/SaleOrder')}
        },{
          path: 'Equipment',// 设备台账
          name: 'Equipment',components: {Equipment:() => import('@/pages/equipment/Equipment')}
        },{
          path: 'EquipmentCharts',// 设备统计图表
          name: 'EquipmentCharts',components: {EquipmentCharts:() => import('@/pages/equipment/report/EquipmentCharts')}
        },{
          path: 'EquipmentMaintenanceCharts',// 设备维保统计图表
          name: 'EquipmentMaintenanceCharts',components: {EquipmentMaintenanceCharts:() => import('@/pages/equipment/report/EquipmentMaintenanceCharts')}
        },{
          path: 'EquipmentInfoClass',// 设备信息分类
          name: 'EquipmentInfoClass',components: {EquipmentInfoClass:() => import('@/pages/equipment/EquipmentInfoClass')}
        },{
          path: 'EquipmentClass',// 设备类型
          name: 'EquipmentClass',components: {EquipmentClass:() => import('@/pages/BasicData/EquipmentClass')}
        },{
          path: 'EquipmentLocationClass',// 设备位置
          name: 'EquipmentLocationClass',components: {EquipmentLocationClass:() => import('@/pages/BasicData/EquipmentLocationClass')}
        },{
          path: 'EquipmentLocationShift',// 设备位置值班排班表
          name: 'EquipmentLocationShift',components: {EquipmentLocationShift:() => import('@/pages/BasicData/EquipmentLocationShift')}
        },{
          path: 'SpareParts',name: 'SpareParts',// 备品备件台账
          components: {SpareParts:() => import('@/pages/equipment/SpareParts')}
        },{
          path: 'EquipMaintenanceCommonParam',name: 'EquipMaintenanceCommonParam',// 设备维修常用参数
          components: {EquipMaintenanceCommonParam:() => import('@/pages/equipment/EquipMaintenanceCommonParam')}
        },{
          path: 'EquipRepair',name: 'EquipRepair',// 设备报修
          components: {EquipRepair:() => import('@/pages/equipment/repair/EquipRepair')}
        },{
          path: 'EquipRepairBill',name: 'EquipRepairBill',// 设备维修单
          components: {EquipRepairBill:() => import('@/pages/equipment/repair/EquipRepairBill')}
        },{
          path: 'ComprehensiveRepair',name: 'ComprehensiveRepair',// 综合事务报修
          components: {ComprehensiveRepair:() => import('@/pages/equipment/repair/ComprehensiveRepair')}
        },{
          path: 'ComprehensiveRepairBill',name: 'ComprehensiveRepairBill',// 综合事务工单
          components: {ComprehensiveRepairBill:() => import('@/pages/equipment/repair/ComprehensiveRepairBill')}
        },{
          path: 'EquipRepairPlan',name: 'EquipRepairPlan',// 设备维修计划
          components: {EquipRepairPlan:() => import('@/pages/equipment/repair/EquipRepairPlan')}
        },{
          path: 'RepairList',name: 'RepairList',// 设备维修记录
          components: {RepairList:() => import('@/pages/equipment/repair/RepairList')}
        },{
          path: 'ComprehensiveRepairList',name: 'ComprehensiveRepairList',// 综合事务维修记录
          components: {ComprehensiveRepairList:() => import('@/pages/equipment/repair/ComprehensiveRepairList')}
        },{
          path: 'EquipMaintenanceStandard',name: 'EquipMaintenanceStandard',//设备保养标准
          components: {EquipMaintenanceStandard:() => import('@/pages/equipment/maintenance/EquipMaintenanceStandard')}
        },{
          path: 'EquipBYPlan',name: 'EquipBYPlan',//设备保养计划
          components: {EquipBYPlan:() => import('@/pages/equipment/maintenance/EquipBYPlan')}
        },{
          path: 'BYBill',name: 'BYBill',//设备保养工单
          components: {BYBill:() => import('@/pages/equipment/maintenance/BYBill')}
        },{
          path: 'MyBYBill',name: 'MyBYBill',//我的设备保养工单
          components: {MyBYBill:() => import('@/pages/equipment/maintenance/MyBYBill')}
        },{
          path: 'BYList',name: 'BYList',//设备保养记录
          components: {BYList:() => import('@/pages/equipment/maintenance/BYList')}
        },{
          path: 'MyEquipRepairBill',name: 'MyEquipRepairBill',//设备维修---我维修
          components: {MyEquipRepairBill:() => import('@/pages/equipment/repair/MyEquipRepairBill')}
        },{
          path: 'MyComprehensiveRepairBill',name: 'MyComprehensiveRepairBill',//综合事务维修---我维修
          components: {MyComprehensiveRepairBill:() => import('@/pages/equipment/repair/MyComprehensiveRepairBill')}
        },{
          path: 'MyComprehensiveRepair',name: 'MyComprehensiveRepair',//综合事务维修---我报修
          components: {MyComprehensiveRepair:() => import('@/pages/equipment/repair/MyComprehensiveRepair')}
        },{
          path: 'MyEquipRepair',name: 'MyEquipRepair',//设备维修---我报修
          components: {MyEquipRepair:() => import('@/pages/equipment/repair/MyEquipRepair')}
        },{
          path: 'PurchaseReceipt',name: 'PurchaseReceipt',components: {PurchaseReceipt:() => import('@/pages/PurchaseReceipt')}
        },{
          path: 'MixOilRecipe',name: 'MixOilRecipe',components: {MixOilRecipe:() => import('@/pages/MixOilRecipe')}
        },{
          path: 'WorkShopSection',name: 'WorkShopSection',components: {WorkShopSection:() => import('@/pages/WorkShopSection')}
        },{
          path: 'ProducePick',name: 'ProducePick',components: {ProducePick:() => import('@/pages/ProducePick')}
        },{
          path: 'ItemInOutBook',name: 'ItemInOutBook',components: {ItemInOutBook:() => import('@/pages/ItemInOutBook')}
        },{
          path: 'TechnologyParameter',name: 'TechnologyParameter',components: {TechnologyParameter:() => import('@/pages/TechnologyParameter')}
        },{
          path: 'TechnologyScheme',name: 'TechnologyScheme',components: {TechnologyScheme:() => import('@/pages/TechnologyScheme')}
        },{
          path: 'Rapeseed',name: 'Rapeseed',components: {Rapeseed:() => import('@/pages/oil/Rapeseed')}
        },{
          path: 'OilsManage',name: 'OilsManage',components: {OilsManage:() => import('@/pages/oil/OilsManage')}
        },{
          path: 'OilProductPackage',name: 'OilProductPackage',components: {OilProductPackage:() => import('@/pages/oil/OilProductPackage')}
        },{
          path: 'PurchaseSuggest',name: 'PurchaseSuggest',components: {PurchaseSuggest:() => import('@/pages/PurchaseSuggest')}
        },{
          path: 'DataPermissionCategory',name: 'DataPermissionCategory',components: {DataPermissionCategory:() => import('@/pages/datapermisson/DataPermissionCategory')}
        },{
          path: 'WarehouseQuery',name: 'WarehouseQuery',components: {WarehouseQuery:() => import('@/pages/Warehouse/WarehouseQuery')}
        },{
          path: 'RoleDataPermission',name: 'RoleDataPermission',components: {RoleDataPermission:() => import('@/pages/datapermisson/RoleDataPermission')}
        },{
          path: 'ItemClass',name: 'ItemClass',components: {ItemClass:() => import('@/pages/ItemClass')}
        },{
          path: 'OtherPick',name: 'OtherPick',components: {OtherPick:() => import('@/pages/OtherPick')}
        },{
          path: 'OrganizationMgr',name: 'OrganizationMgr',components: {OrganizationMgr:() => import('@/pages/organization/OrganizationMgr')}
        },{
          path: 'AnnualMain',name: 'AnnualMain',components: {AnnualMain:() => import('@/pages/productionplan/annual/AnnualMain')}
        },{
          path: 'Apply',name: 'Apply',components: {Apply:() => import('@/pages/Apply')}
        },{
          path: 'OtherReceiving',name: 'OtherReceiving',components: {OtherReceiving:() => import('@/pages/OtherReceiving')}
        },{
          path: 'Unit',name: 'Unit',components: {Unit:() => import('@/pages/Unit')}
        },{
          // 入库
          path: 'Stockin',name: 'Stockin',components: {Stockin:() => import('@/pages/Stockin')}
        },{
          // 出库
          path: 'Stockout',name: 'Stockout',components: {Stockout:() => import('@/pages/Stockout')}
        },{
          // 物料存放规则
          path: 'MaterialRule',name: 'MaterialRule',components: {MaterialRule:() => import('@/pages/MaterialRule')}
        },{
          // 物料存放规则
          path: 'ProductReturn',name: 'ProductReturn',components: {ProductReturn:() => import('@/pages/ProductReturn')}
        },{
          path: 'TakeGoods',name: 'TakeGoods',components: {TakeGoods:() => import('@/pages/TakeGoods')}
        },{
          path: 'MonthlyMain',name: 'MonthlyMain',components: {MonthlyMain:() => import('@/pages/productionplan/monthly/MonthlyMain')}
        },{
          path: 'WeeklyMain',name: 'WeeklyMain',components: {WeeklyMain:() => import('@/pages/productionplan/weekly/WeeklyMain')},// meta: { keepAlive: false }
          // 如果isBack是false,表明需要获取新数据,否则就不再请求,直接使用缓存的数据
          meta: { isBack: false }
        },{
          path: 'WeeklyPlan',name: 'WeeklyPlan',components: {WeeklyPlan:() => import('@/pages/productionplan/weekly/WeeklyPlan')},{
          path: 'TaskMain',name: 'TaskMain',components: {TaskMain:() => import('@/pages/productiontask/TaskMain')},},{
          path: 'TaskDispatch',name: 'TaskDispatch',components: {TaskDispatch:() => import('@/pages/productiontask/TaskDispatch')},{
          path: 'PrintTemplate',name: 'PrintTemplate',components: {PrintTemplate:() => import('@/pages/print/PrintTemplate')},{
          path: 'UnloadLocation',name: 'UnloadLocation',components: {UnloadLocation:() => import('@/pages/BasicData/UnloadLocation')},{
          path: 'TankInfo',name: 'TankInfo',components: {TankInfo:() => import('@/pages/tank/TankInfo')},{
          path: 'TankFarmRuler',name: 'TankFarmRuler',components: {TankFarmRuler:() => import('@/pages/tank/TankFarmRuler')},{
          path: 'TankDailyReport',name: 'TankDailyReport',components: {TankDailyReport:() => import('@/pages/tank/TankDailyReport')},{
          path: 'TankInspection',name: 'TankInspection',components: {TankInspection:() => import('@/pages/tank/TankInspection')},{
          //  托盘管理
          path: 'PalletInfo',name: 'PalletInfo',// component: resolve => require(['@/pages/PalletManage'],resolve)
          components: {PalletInfo:() => import('@/pages/Storage/PalletInfoManage')},{
          //  库区类型
          path: 'StorageSort',name: 'StorageSort',resolve)
          components: {StorageSort:() => import('@/pages/Storage/StorageSortManage')},{
          path: 'BusinessConfig',name: 'BusinessConfig',components: {BusinessConfig:() => import('@/pages/BusinessConfig')},{
          //收发油
          path: 'ReceiveOutOil',name: 'ReceiveOutOil',components: {ReceiveOutOil:() => import('@/pages/ReceiveOutOil')},{
          //采购收货管理
          path: 'PurchaseReceiptManage',name: 'PurchaseReceiptManage',components: {PurchaseReceiptManage:() => import('@/pages/PurchaseReceiptManage')},{
          //成品油规格管理
          path: 'OilSpecManage',name: 'OilSpecManage',components: {OilSpecManage:() => import('@/pages/OilSpecManage')},{
          //初始化规则
          path: 'SystemRestore',name: 'SystemRestore',components: {SystemRestore:() => import('@/pages/SYS/SystemRestore')},{
          // 仓库
          path: 'WarehouseInfo',name: 'WarehouseInfo',components: {WarehouseInfo:() => import('@/pages/Storage/WarehouseInfoManage')},{
          // 称重录入
          path: 'WeighInput',name: 'WeighInput',components: {WeighInput:() => import('@/pages/weighRecords/WeighInput')},{
          // 菜籽收购(临时)
          path: 'RapeseedBuyTemp',name: 'RapeseedBuyTemp',components: {RapeseedBuyTemp:() => import('@/pages/rapeseedBuyTemps/RapeseedBuyTemp')},{
          // 项目
          path: 'Project',name: 'Project',components: {Project:() => import('@/pages/BasicData/Project')},{
          // 项目分类
          path: 'ProjectClass',name: 'ProjectClass',components: {ProjectClass:() => import('@/pages/BasicData/ProjectClass')},{
          // 存货分类
          path: 'InventoryClass',name: 'InventoryClass',components: {InventoryClass:() => import('@/pages/BasicData/InventoryClass')},{
          // 部门
          path: 'Department',name: 'Department',components: {Department:() => import('@/pages/BasicData/Department')},{
          // 员工资料
          path: 'Employee',name: 'Employee',components: {Employee:() => import('@/pages/BasicData/Employee')},{
          // 往来单位分类
          path: 'PartnerClass',name: 'PartnerClass',components: {PartnerClass:() => import('@/pages/BasicData/PartnerClass')}
        },{
          // 地区资料
          path: 'District',name: 'District',components: {District:() => import('@/pages/BasicData/District')}
        },{
          // 往来单位
          path: 'Partner',name: 'Partner',components: {Partner:() => import('@/pages/BasicData/Partner')}
        },{
          // 品牌
          path: 'Product',name: 'Product',components: {Product:() => import('@/pages/BasicData/Product')}
        },{
          // 计量单位
          path: 'UnitInfo',name: 'UnitInfo',components: {UnitInfo:() => import('@/pages/BasicData/UnitInfo')}
        },{
          // 存货信息
          path: 'InventoryInfo',name: 'InventoryInfo',components: {InventoryInfo:() => import('@/pages/BasicData/InventoryInfo')}
        },{
          // 币种
          path: 'Currency',name: 'Currency',components: {Currency:() => import('@/pages/BasicData/Currency')}
        },{
          // 出入库类别
          path: 'RDStyle',name: 'RDStyle',components: {RDStyle:() => import('@/pages/BasicData/RDStyle')}
        },{
          // 业务分类
          path: 'BusiType',name: 'BusiType',components: {BusiType:() => import('@/pages/BasicData/BusiType')}
        },{
          //单据分类
          path: 'BillType',name: 'BillType',components: {BillType:() => import('@/pages/BasicData/BillType')}
        },{
          // 调配订单
          path: 'MixOilOrder',name: 'MixOilOrder',components: {MixOilOrder:() => import('@/pages/MixOil/MixOilOrder')}
        },{
          // 调配订单调配过程
          path: 'MixOilOrderDetail',name: 'MixOilOrderDetail',components: {MixOilOrderDetail:() => import('@/pages/MixOil/MixOilOrderDetail')}
        },{
          // 调配订单明细浏览
          path: 'MixOilOrderDetailView',name: 'MixOilOrderDetailView',components: {MixOilOrderDetailView:() => import('@/pages/MixOil/MixOilOrderDetailView')}
        },{
          // 行驶证
          path: 'VehiceInfo',name: 'VehiceInfo',components: {VehiceInfo:() => import('@/pages/BasicData/VehiceInfo')}
        },{
          // 司机信息
          path: 'DriverInfo',name: 'DriverInfo',components: {DriverInfo:() => import('@/pages/BasicData/DriverInfo')}
        },{
          // 叫号入厂
          path: 'CallFactory',name: 'CallFactory',components: {CallFactory:() => import('@/pages/PreInStore/CallFactory')}
        },{
          // 菜籽入库
          path: 'PreInStoreExtend',name: 'PreInStoreExtend',components: {PreInStoreExtend:() => import('@/pages/PreInStore/PreInStoreExtend')}
        },{
          // 出厂还卡
          path: 'FactoryCardReturn',name: 'FactoryCardReturn',components: {FactoryCardReturn:() => import('@/pages/PreInStore/CardReturnAudit')}
        },{
          // 审核入库
          path: 'AuditWarehouse',name: 'AuditWarehouse',components: {AuditWarehouse:() => import('@/pages/PreInStore/CardReturnAudit')}
        },{
          // 质检模板
          path: 'QTTemplate',name: 'QTTemplate',components: {QTTemplate:() => import('@/pages/BasicData/QTTemplate')}
        },{
          // 产成品入库
          path: 'ProductReceiveIn',name: 'ProductReceiveIn',components: {ProductReceiveIn:() => import('@/pages/StoreBill/ProductReceive')}
        },{
          // 产成品出库
          path: 'ProductReceiveOut',name: 'ProductReceiveOut',components: {ProductReceiveOut:() => import('@/pages/StoreBill/ProductReceive')}
        },{
          // 产成品出入库-添加修改
          path: 'ProductReceiveAddUpdateIn',name: 'ProductReceiveAddUpdateIn',components: {ProductReceiveAddUpdateIn:() => import('@/pages/StoreBill/ProductReceiveAddUpdate')}
        },{
          // 产成品出入库-添加修改
          path: 'ProductReceiveAddUpdateOut',name: 'ProductReceiveAddUpdateOut',components: {ProductReceiveAddUpdateOut:() => import('@/pages/StoreBill/ProductReceiveAddUpdate')}
        },{
          //进厂质检
          path: 'InQualityTest',name: 'InQualityTest',components: {InQualityTest:() => import('@/pages/PreInStore/InQualityTest')}
        },{
          //出入厂初检
          path: 'PreInStorePreQT1',name: 'PreInStorePreQT1',components: {PreInStorePreQT1:() => import('@/pages/PreInStore/PreInStoreQT')}
        },{
          //出入厂复检
          path: 'PreInStoreQT1',name: 'PreInStoreQT1',components: {PreInStoreQT1:() => import('@/pages/PreInStore/PreInStoreQT')}
        },{
          //出入厂初检
          path: 'PreInStorePreQT0',name: 'PreInStorePreQT0',components: {PreInStorePreQT0:() => import('@/pages/PreInStore/PreInStoreQT')}
        },{
          //出入厂复检
          path: 'PreInStoreQT0',name: 'PreInStoreQT0',components: {PreInStoreQT0:() => import('@/pages/PreInStore/PreInStoreQT')}
        },{
          //出入厂毛重
          path: 'PreInStoreGross',name: 'PreInStoreGross',components: {PreInStoreGross:() => import('@/pages/PreInStore/PreInStoreScale')}
        },{
          //出入厂皮重
          path: 'PreInStoreUnladen',name: 'PreInStoreUnladen',components: {PreInStoreUnladen:() => import('@/pages/PreInStore/PreInStoreScale')}
        },{
          //出入厂装卸
          path: 'PreInStoreLoad',name: 'PreInStoreLoad',components: {PreInStoreLoad:() => import('@/pages/PreInStore/PreInStoreLoad')}
        },{
          //系统枚举
          path: 'SysEnum',name: 'SysEnum',components: {SysEnum:() => import('@/pages/BasicData/SysEnum')}
        },{
          //入厂登记
          path: 'FactoryEntryRegister',name: 'FactoryEntryRegister',components: {FactoryEntryRegister:() => import('@/pages/PreInStore/FactoryEntryRegister')}
        },{
          //预约录入
          path: 'ReservationEntry',name: 'ReservationEntry',components: {ReservationEntry:() => import('@/pages/PreInStore/ReservationEntry')}
        },{
          //货位
          path: 'InvLocation',name: 'InvLocation',components: {InvLocation:() => import('@/pages/BasicData/InvLocation')}
        },{
          //采购入库单
          path: 'PurchaseWarehousing',name: 'PurchaseWarehousing',components: {PurchaseWarehousing:() => import('@/pages/PrevRDFactory/PrevRDFactoryBill')}
        },{
          //采购退货单
          path: 'PurchaseReturnGoods',name: 'PurchaseReturnGoods',components: {PurchaseReturnGoods:() => import('@/pages/PrevRDFactory/PrevRDFactoryBill')}
        },{
          //销售出库单
          path: 'SaleIssue',name: 'SaleIssue',components: {SaleIssue:() => import('@/pages/PrevRDFactory/PrevRDFactoryBill')}
        },{
          //销售退货单
          path: 'SaleReturnGoods',name: 'SaleReturnGoods',components: {SaleReturnGoods:() => import('@/pages/PrevRDFactory/PrevRDFactoryBill')}
        },{
          //材料出库单
          path: 'MaterialDispatchBillIn',name: 'MaterialDispatchBillIn',components: {MaterialDispatchBillIn:() => import('@/pages/StoreBill/MaterialDispatchBill')}
        },{
          //材料出库退货单
          path: 'MaterialDispatchBillOut',name: 'MaterialDispatchBillOut',components: {MaterialDispatchBillOut:() => import('@/pages/StoreBill/MaterialDispatchBill')}
        },{
          //材料出库单-添加修改
          path: 'MaterialDispatchBillAddUpdateIn',name: 'MaterialDispatchBillAddUpdateIn',components: {MaterialDispatchBillAddUpdateIn:() => import('@/pages/StoreBill/MaterialDispatchBillAddUpdate')}
        },{
          //材料出库单-添加修改
          path: 'MaterialDispatchBillAddUpdateOut',name: 'MaterialDispatchBillAddUpdateOut',components: {MaterialDispatchBillAddUpdateOut:() => import('@/pages/StoreBill/MaterialDispatchBillAddUpdate')}
        },{
          //粕库报表
          path: 'MealWarehouse',name: 'MealWarehouse',components: {MealWarehouse:() => import('@/pages/Report/MealWarehouse')}
        },{
          //包装油BOM清单
          path: 'PackagingOilBom',name: 'PackagingOilBom',components: {PackagingOilBom:() => import('@/pages/BasicData/PackagingOilBom')}
        },{
          //用电量报表
          path: 'PowerReport',name: 'PowerReport',components: {PowerReport:() => import('@/pages/Energy/PowerReport')}
        },{
          //用水量报表
          path: 'WaterReport',name: 'WaterReport',components: {WaterReport:() => import('@/pages/Energy/WaterReport')}
        },{
          //用蒸汽量报表
          path: 'SteamReport',name: 'SteamReport',components: {SteamReport:() => import('@/pages/Energy/SteamReport')}
        },{
          //生产报备
          path: 'TaskEvent',name: 'TaskEvent',components: {TaskEvent:() => import('@/pages/productiontask/TaskEvent')}
        },{
          //质检点位
          path: 'QTLocation',name: 'QTLocation',components: {QTLocation:() => import('@/pages/BasicData/QTLocation')}
        },{
          //存货质检设置
          path: 'InventoryQTSet',name: 'InventoryQTSet',components: {InventoryQTSet:() => import('@/pages/BasicData/InventoryQTSet')}
        },{
          //精炼生产订单明细
          path: 'RefineDetail',name: 'RefineDetail',components: {RefineDetail:() => import('@/pages/Refine/RefineDetail')}
        },{
          //浏览精炼生产订单明细
          path: 'RefineDetailView',name: 'RefineDetailView',components: {RefineDetailView:() => import('@/pages/Refine/RefineDetailView')}
        },{
          //过程质检-烘干
          path: 'Dry',name: 'Dry',components: {Dry:() => import('@/pages/QTs/ProcessQT')}
        },{
          //过程质检-清理
          path: 'Clear',name: 'Clear',components: {Clear:() => import('@/pages/QTs/ProcessQT')}
        },{
          //过程质检-预产
          path: 'PreProduction',name: 'PreProduction',components: {PreProduction:() => import('@/pages/QTs/ProcessQT')}
        },{
          //过程质检-预榨炒料
          path: 'PrePressedFriedMaterials',name: 'PrePressedFriedMaterials',components: {PrePressedFriedMaterials:() => import('@/pages/QTs/ProcessQT')}
        },{
          //过程质检-预榨产出
          path: 'PrePressedOutput',name: 'PrePressedOutput',components: {PrePressedOutput:() => import('@/pages/QTs/ProcessQT')}
        },{
          //过程质检-浸出
          path: 'Leach',name: 'Leach',components: {Leach:() => import('@/pages/QTs/ProcessQT')}
        },{
          //过程质检-精炼
          path: 'Refine',name: 'Refine',components: {Refine:() => import('@/pages/QTs/ProcessQT')}
        },{
          //过程质检-调和
          path: 'Reconcile',name: 'Reconcile',components: {Reconcile:() => import('@/pages/QTs/ProcessQT')}
        },{
          //过程质检-包装
          path: 'Packing',name: 'Packing',components: {Packing:() => import('@/pages/QTs/ProcessQT')}
        },{
          //设备预警信息看板
          path: 'EquipmentAlarmKanban',name: 'EquipmentAlarmKanban',components: {EquipmentAlarmKanban:() => import('@/pages/kanban/EquipmentAlarmKanban')}
        },{
          //能源消耗情况看板
          path: 'EnergyStatusKanBan',name: 'EnergyStatusKanBan',components: {EnergyStatusKanBan:() => import('@/pages/kanban/EnergyStatusKanBan')}
        },{
          //成本效益分析看板
          path: 'CostBenefitKanban',name: 'CostBenefitKanban',components: {CostBenefitKanban:() => import('@/pages/kanban/CostBenefitKanban')}
        },{
          //其他质检-污水处理
          path: 'Sewerage',name: 'Sewerage',components: {Sewerage:() => import('@/pages/QTs/OtherQT')}
        },{
          //仓库质检-筒仓
          path: 'Silo',name: 'Silo',components: {Silo:() => import('@/pages/QTs/WarehouseQT')}
        },{
          //仓库质检-压榨毛油罐
          path: 'PressCrudeOilTank',name: 'PressCrudeOilTank',components: {PressCrudeOilTank:() => import('@/pages/QTs/WarehouseQT')}
        },{
          //仓库质检-浸出毛油罐
          path: 'LeachingCrudeOilTank',name: 'LeachingCrudeOilTank',components: {LeachingCrudeOilTank:() => import('@/pages/QTs/WarehouseQT')}
        },{
          //仓库质检-精炼成品油罐
          path: 'RefinedProductCrudeOilTank',name: 'RefinedProductCrudeOilTank',components: {RefinedProductCrudeOilTank:() => import('@/pages/QTs/WarehouseQT')}
        },{
          //仓库质检-小包装仓库
          path: 'SmallPackagingWarehouse',name: 'SmallPackagingWarehouse',components: {SmallPackagingWarehouse:() => import('@/pages/QTs/WarehouseQT')}
        },{
          //仓库质检-粕库
          path: 'MealStorehouse',name: 'MealStorehouse',components: {MealStorehouse:() => import('@/pages/QTs/WarehouseQT')}
        },{
          //包装车间生产看板
          path: "PackagingWorkshopKanban",name: 'PackagingWorkshopKanban',components: {PackagingWorkshopKanban:() => import('@/pages/kanban/PackagingWorkshopKanban')}
        },{
          //精炼车间1号离心机
          path: "JLWorkshopLXJ01Kanban",name: 'JLWorkshopLXJ01Kanban',components: {JLWorkshopLXJ01Kanban:() => import('@/pages/kanban/JLWorkshopLXJ01Kanban')}
        },{
          //精炼车间2号离心机
          path: "JLWorkshopLXJ02Kanban",name: 'JLWorkshopLXJ02Kanban',components: {JLWorkshopLXJ02Kanban:() => import('@/pages/kanban/JLWorkshopLXJ02Kanban')}
        },{
          //自控变量配置-调配单
          path: "TagConfigMixOilOrder",name: "TagConfigMixOilOrder",components: {TagConfigMixOilOrder:() => import('@/pages/TagConfig/TagConfigMixOilOrder')}
        },{
          //财务报表-收入报表
          path: "Revenue",name: "Revenue",components: {Revenue:() => import('@/pages/FinancialStatements/RevenueExpenditure')}
        },{
          //财务报表-支出报表
          path: "Expenditure",name: "Expenditure",components: {Expenditure:() => import('@/pages/FinancialStatements/RevenueExpenditure')}
        },{
          //财务报表-年度预算
          path: "Budget",name: "Budget",components: {Budget:() => import('@/pages/FinancialStatements/BudgetBalance')}
        },{
          //财务报表-预算结余
          path: "Balance",name: "Balance",components: {Balance:() => import('@/pages/FinancialStatements/BudgetBalance')}
        },]
    }
  ]
});

原文地址:https://blog.csdn.net/lee576/article/details/127937929

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


https://segmentfault.com/a/1190000022018995 https://www.jianshu.com/p/8c3599dda094 vuex教程中,有这样一句话和这样一段代码: 实践中,我们会经常用到 ES2015 的参数解构来简化代码(特别是我们需要调用commi
ES6 (ECMAScript 6)中的模块是一个包含 JavaScript 代码的文件,在这个模块中所有的变量都对其他模块是不可见的,除非我们导出它。 ES6的模块系统大致分为导出(export)和导入(import)两个模块。 1、模块导出(export) 可以 导出 所有的最外层 函数 、 类
from https://mp.weixin.qq.com/s/-rc1lYYlsfx-wR4mQmIIQQ Vue知识点汇总(含Vue3) 一、Vue 基础 1. Vue的基本原理 当一个Vue实例创建时,Vue会遍历data中的属性,用 Object.defineProperty(vue3.0使
D:\Temp&gt;npm init vite@latest vue3study --template vuenpm ERR! code ETIMEDOUTnpm ERR! errno ETIMEDOUTnpm ERR! network request to https://registry.np
文章浏览阅读1.2k次。最近自己从零撸起的甘特图组件需要子组件的滚动条同步滚动这就涉及到子组件之间的互相通信,通过 消息总线可以达到我们的需求 ,首先建立一个标志位,拖动左边滚动条的时候,右边的滚动条事件不处理,反之拖动右边滚动条时,左边的滚动条事件不做处理,建立一个公共的变量用于两者的互斥store.jsimport Vue from 'vue'export let store = Vue.observable({ scrollFlag: true})export let mutations =.._vue 能不能同时有两个滚动事件
文章浏览阅读3.3k次,点赞3次,收藏16次。静默打印是什么?简单来说就是不需要用户点击"打印",自动去打印,但是使用浏览器web打印不可避免的要弹出以下画面面对这种问题也只能用"富客户端"技术来解决,在浏览器的沙盒安全模型中无法做到,那么只能使用插件的技术,这个我们就不自己花力气去做了,我找来了 lodop 这个免费的打印组件,功能还是挺强大的,下载下图的发行包解压后安装下图两个exe如果你的系统是64位的,可以安装install_lodop64.exe上图的LodopFuncs.js 是客户端要使用的核心库文件..._this.$getlodop().then((lodop) =>{
文章浏览阅读1.7k次。个人觉得大屏展示其实很简单,噱头多过技术含量,下面使用了 DataV (不是阿里的那个DataV哈,具体链接在这里)开发了一个大屏展示,使用了css flex弹性布局,使用了DataV的一些比较酷炫的边框(SVG写的),基本上功能没有全部完成,但是模子已经刻出来了,只是后端推送的内容没有全部写出来前端<template> <dv-full-screen-container class="screen-container"> <div class="ti_用signalr做一个简单的实时大屏显示
文章浏览阅读3.4k次,点赞3次,收藏10次。【说明】导入的Excel 字体颜色和背景色只能识别【标准色】,别的如"主题颜色",exceljs 解析出来不是颜色值。导入的样式包括字体,字号,列宽,合并单元格,【部分能识别】的背景色,文字颜色。导入到 x-data-spreadsheet 如下图。原Excel样式如下。_x-data-spreadsheet
文章浏览阅读1.7k次。之前参考某文章把 router-view 放在 el-tab-pane 外面都不起作用,问题根本不是出在 el-tab-pane,而是v-for 里面有多个route-view , keep-alive 时 tab 并未销毁掉,而是缓存隐藏了起来。需要把 router-view 的 name 与路由的 index.js 名称对应起来。之前参照很多文章修改试图修正这个问题,结果都徒劳,终于让我找到。我做了如下修改,主页面 main.vue。_el-tab-pane 后面接router-view
文章浏览阅读533次。今天在一台虚拟机上面运行老项目,报各种类型上图的错误提示,一开始还以为是less的问题,结果一个个装完还是报错,后面又说webpack, webpack cli有问题,头有点大了,google 一下,发现一个命令。讨论这个命令的文章,可以了解一下。运行以后终于出现了期待已久的。_npm install 忽略依赖
文章浏览阅读8k次,点赞3次,收藏12次。从这篇文章得到启发先定义一个组件从外部接收Template,然后在组件里调用<template > <div ref="markedContent"></div></template><script>import Vue from 'vue/dist/vue.esm.js'export default { name: 'wf-marked-content', props: ['content'], mounte.._vue components 动态传入模板
文章浏览阅读5.4k次。参考上一篇知识开发的一个功能,制作一个打印模板的管理模块,如下(就是保存froala编辑后的html文本,其中包括Vue的Template,这样我们可以利用Vue的模板的优势来动态绑定一些数据源进行HTML的打印,基本上跟过去水晶报表做一个模板再绑定数据源的方法异曲同工)在 main.js 里引用 froala 组件// Import and use Vue Froala lib.import VueFroala from 'vue-froala-wysiwyg'// 引入 Fr.._vue设计网页打印模板
文章浏览阅读992次。计划是这样,公司的项目一直在持续改动,安装包总是需要频繁生成新的,由此我想到了"持续集成"!有自动化工具不用,岂不可惜?这周的主要时间就用来学习CruiseControl.Net全面实现持续集成_怎么在vue的 script部分使用 eldigloa
文章浏览阅读1.2k次。其实Element UI 只用了文字提示的 el-tooltip 组件,不喜欢可以去掉,不记得是从哪拿到的原始代码,我给加了高亮渐变显示,图标,和拖拽时只能拖拽图标的位置,效果如上图,可以水平方向拖动,也可以垂直方向拖动。样式是less写的,css写嵌套样式太繁琐了。拿来主义,改造有理!下面贴代码<template> <div ref="splitPane" class="split-pane" :class="direction" :"{ fl..._element ui拉条样式
文章浏览阅读953次,点赞2次,收藏2次。接上一篇,这次加入的是从x-speadsheet导出Excel,并且带有x-speadsheet中的样式,重点关注 exportExcel 这个方法,我加入了 tinycolor 这个库用来翻译颜色值,值得注意的是, exceljs的颜色值是 argb 不是 rgba,一定不要弄混了a 是代表的透明度放在最前面_x-data-spreadsheet 导出
文章浏览阅读5.5k次,点赞2次,收藏21次。尝试了两个连线库 jsplumb 和 leadline ,其实两个库都很强大,但是基于个人使用的习惯,决定还是用 leadline ,在Vue 下我使用它的一个包装库 leader-line-vue 下面是上图的连接线示例代码,连接线很轻松的就实现了一个渐变效果..._vue 连线
文章浏览阅读4.2k次,点赞2次,收藏5次。首先官网推荐的安装方法没有生成dist文件,导致样式表等这些文件并没有生成npm install element-plus --save以上方法是有问题的,如果不幸执行了上面的命令,那么先执行卸载npm uninstall element-plus删除 main.js文件对element ui的引用,输入以下命令vue add element-plus..._elementui3.0
文章浏览阅读3.1k次。如上图,下面贴代码<template> <div> <el-date-picker size="large" style ="width:120px" v-model="selectYear" format="yyyy 年" value-format="yyyy" type="year" :clearable = "false" placeholder="选择年">.._vue多选周
文章浏览阅读1.8k次,点赞6次,收藏6次。经过 2021年的一个春节,从年前到现在,大致撸出一个 甘特图,进度条是用SVG画的,使用了几个工具库 (interactjs 用来处理拖拽和修改尺寸,snap.svg 用来处理 svg 的dom 操作,moment.js用来处理时间的操作),其他没有依赖任何的UI组件,目前初见雏形,还比较粗糙,后面会不断更新源码地址点击期间也摸索了怎么把vs code的项目上传到 GitHub 上面进行源代码的管理,基本上是参考的这篇文章做的..._vue gantt demo
文章浏览阅读2.1k次。接上两篇vue 下使用 exceljs + x-spreadsheet 带样式导入Excelvue 下使用 exceljs + x-spreadsheet 带样式导出Excel下面封装好一个组件调用组件的页面效果如图,目前“导出Json”还没有做_x-spreadsheet导入导出