| | |
| | | * a base page that does not have permission requirements |
| | | * all roles can be accessed |
| | | */ |
| | | // 公用模块 |
| | | export const commonRoutes = [ |
| | | /* |
| | | * 看板部分路由 |
| | |
| | | } |
| | | // { path: '*', redirect: '/404', hidden: true } |
| | | ] |
| | | // 未上云模块 |
| | | export const asyncRoutes = [ |
| | | // { |
| | | // path: '/gtt', |
| | | // component: Layout, |
| | | // redirect: '/gtt/back', |
| | | // name: '基础设置', |
| | | // code: '1001', |
| | | // meta: { code: '1001', title: '基础设置', icon: 'tree' }, |
| | | // alwaysShow: true, // 当children只有一个时,也显示父菜单 |
| | | // children: [{ |
| | | // path: 'back', |
| | | // name: 'YYQDCancel', |
| | | // code: '1011', |
| | | // component: () => import('@/views/gantt_back/gantt_back'), |
| | | // meta: { code: '1011', title: '用户清单', icon: '', keepAlive: true } |
| | | // }, { |
| | | // path: 'zdpc2', |
| | | // name: 'YYQDCancel', |
| | | // code: '1012', |
| | | // component: () => import('@/views/gantt_back/zdpc2'), |
| | | // meta: { code: '1012', title: '自动排程2', icon: '', keepAlive: true } |
| | | // }] |
| | | // }, |
| | | { |
| | | path: '/jcsz', |
| | | component: Layout, |
| | | redirect: '/jcsz/zzjg', |
| | | name: '基础设置', |
| | | code: '1001', |
| | | meta: { code: '1001', title: '基础设置', icon: 'tree2' }, |
| | | alwaysShow: true, // 当children只有一个时,也显示父菜单 |
| | | children: [ |
| | | { |
| | | path: 'zzjg', |
| | | name: 'ZZJGCancel', |
| | | code: '1010', |
| | | component: () => import('@/views/jcsz/zzjg'), |
| | | meta: { code: '1010', title: '组织架构', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'yhqd', |
| | | name: 'YYQDCancel', |
| | | code: '1011', |
| | | component: () => import('@/views/jcsz/yhqd'), |
| | | meta: { code: '1011', title: '用户清单', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'jsqd', |
| | | name: 'JSQDCancel', |
| | | code: '1012', |
| | | component: () => import('@/views/jcsz/jsqd'), |
| | | meta: { code: '1012', title: '角色清单', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'wldw', |
| | | name: 'WLDWCancel', |
| | | code: '1013', |
| | | component: () => import('@/views/jcsz/wldw'), |
| | | meta: { code: '1013', title: '往来单位', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'adsz', |
| | | name: 'ADZZCancel', |
| | | code: '1014', |
| | | component: () => import('@/views/jcsz/adsz'), |
| | | meta: { code: '1014', title: '安灯设置', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/sbgl', |
| | | component: Layout, |
| | | redirect: '/sbgl/sblx', |
| | | name: '设备管理', |
| | | code: '1002', |
| | | meta: { code: '1002', title: '设备管理', icon: 'example' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'sblx', |
| | | name: 'SBLXCancel', |
| | | code: '1020', |
| | | component: () => import('@/views/sbgl/sblx'), |
| | | meta: { code: '1020', title: '设备类型', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'wxjl', |
| | | code: '1029Cancel', |
| | | name: 'WXJL', |
| | | component: () => import('@/views/sbgl/wxjl'), |
| | | meta: { code: '1029', title: '维修记录', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'sbz', |
| | | name: 'SBZCancel', |
| | | code: '1021', |
| | | component: () => import('@/views/sbgl/sbz'), |
| | | meta: { code: '1021', title: '设备组', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'sbqd', |
| | | name: 'sbqdCancel', |
| | | code: '1022', |
| | | component: () => import('@/views/sbgl/sbqd'), |
| | | meta: { code: '1022', title: '设备清单', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'djbz', |
| | | name: 'DJBZCancel', |
| | | code: '1023', |
| | | component: () => import('@/views/sbgl/djbz'), |
| | | meta: { code: '1023', title: '点检标准', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'djbw', |
| | | name: 'DJBWCancel', |
| | | code: '1024', |
| | | component: () => import('@/views/sbgl/djbw'), |
| | | meta: { code: '1024', title: '点检部位', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'bybz', |
| | | name: 'BYBZCancel', |
| | | code: '1025', |
| | | component: () => import('@/views/sbgl/bybz'), |
| | | meta: { code: '1025', title: '保养标准', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'bybw', |
| | | name: 'BYBWCancel', |
| | | code: '1026', |
| | | component: () => import('@/views/sbgl/bybw'), |
| | | meta: { code: '1026', title: '保养部位', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'djjl', |
| | | name: 'DJJLCancel', |
| | | code: '1027', |
| | | component: () => import('@/views/sbgl/djjl'), |
| | | meta: { code: '1027', title: '点检记录', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'byjl', |
| | | name: 'BYJLCancel', |
| | | code: '1028', |
| | | component: () => import('@/views/sbgl/byjl'), |
| | | meta: { code: '1028', title: '保养记录', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'wxjl', |
| | | name: 'WXJLCancel', |
| | | code: '1029', |
| | | component: () => import('@/views/sbgl/wxjl'), |
| | | meta: { code: '1029', title: '设备维修记录', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'swsqjl', |
| | | name: 'WXSQJLCancel', |
| | | code: '1019', |
| | | component: () => import('@/views/sbgl/swsqjl'), |
| | | meta: { code: '1019', title: '设备申请维修记录', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/gzgl', |
| | | component: Layout, |
| | | redirect: '/gzgl/gzlx', |
| | | name: '工装管理', |
| | | code: '1003', |
| | | meta: { code: '1003', title: '工装管理', icon: 'component' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'gzlx', |
| | | name: 'GZLXCancel', |
| | | code: '1030', |
| | | component: () => import('@/views/gzgl/gzlx'), |
| | | meta: { code: '1030', title: '工装类型', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'sjxj', |
| | | name: 'SJXJCancel', |
| | | code: '1039', |
| | | component: () => import('@/views/gzgl/sjxj'), |
| | | meta: { code: '1039', title: '上机下机', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'ckrk', |
| | | name: 'CKRKCancel', |
| | | code: '1040', |
| | | component: () => import('@/views/gzgl/ckrk'), |
| | | meta: { code: '1040', title: '出库入库', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'gzqd', |
| | | name: 'GZQDCancel', |
| | | code: '1031', |
| | | component: () => import('@/views/gzgl/gzqd'), |
| | | meta: { code: '1031', title: '工装清单', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'djbz', |
| | | name: 'DJBZCancel', |
| | | code: '1032', |
| | | component: () => import('@/views/gzgl/djbz'), |
| | | meta: { code: '1032', title: '点检标准', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'djbw', |
| | | name: 'DJBWCancel', |
| | | code: '1033', |
| | | component: () => import('@/views/gzgl/djbw'), |
| | | meta: { code: '1033', title: '点检部位', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'bybz', |
| | | name: 'BYBZCancel', |
| | | code: '1034', |
| | | component: () => import('@/views/gzgl/bybz'), |
| | | meta: { code: '1034', title: '保养标准', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'bybw', |
| | | name: 'BYBWCancel', |
| | | code: '1035', |
| | | component: () => import('@/views/gzgl/bybw'), |
| | | meta: { code: '1035', title: '保养部位', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'djjl', |
| | | name: 'DJJLCancel', |
| | | code: '1036', |
| | | component: () => import('@/views/gzgl/djjl'), |
| | | meta: { code: '1036', title: '点检记录', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'byjl', |
| | | name: 'BYJLCancel', |
| | | code: '1037', |
| | | component: () => import('@/views/gzgl/byjl'), |
| | | meta: { code: '1037', title: '保养记录', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'gzwx', |
| | | name: 'GZWXCancel', |
| | | code: '1038', |
| | | component: () => import('@/views/gzgl/gzwx'), |
| | | meta: { code: '1038', title: '工装维修', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/wlgl', |
| | | component: Layout, |
| | | redirect: '/wlgl/ckdy', |
| | | name: '物料管理', |
| | | code: '1004', |
| | | meta: { code: '1004', title: '物料管理', icon: 'table' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'ckdy', |
| | | name: 'CKDYCancel', |
| | | code: '1050', |
| | | component: () => import('@/views/wlgl/ckdy'), |
| | | meta: { code: '1050', title: '仓库定义', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'kwdy', |
| | | name: 'KWDYCancel', |
| | | code: '1051', |
| | | component: () => import('@/views/wlgl/kwdy'), |
| | | meta: { code: '1051', title: '库位定义', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'rqlx', |
| | | name: 'RYLXCancel', |
| | | code: '1052', |
| | | component: () => import('@/views/wlgl/rqlx'), |
| | | meta: { code: '1052', title: '容器类型', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'rqqd', |
| | | name: 'RQQDCancel', |
| | | code: '1053', |
| | | component: () => import('@/views/wlgl/rqqd'), |
| | | meta: { code: '1053', title: '容器清单', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'crkjl', |
| | | name: 'CRKJLCancel', |
| | | code: '1054', |
| | | component: () => import('@/views/wlgl/crkjl'), |
| | | meta: { code: '1054', title: '出入库记录', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'kccx', |
| | | name: 'KCCXCancel', |
| | | code: '1055', |
| | | component: () => import('@/views/wlgl/kccx'), |
| | | meta: { code: '1055', title: '库存查询', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/zzmx', |
| | | component: Layout, |
| | | redirect: '/zzmx/gylx', |
| | | name: '制造模型', |
| | | code: '1005', |
| | | meta: { code: '1005', title: '制造模型', icon: 'icu' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'wllx', |
| | | name: 'WLLXCancel', |
| | | code: '1060', |
| | | component: () => import('@/views/zzmx/wllx'), |
| | | meta: { code: '1060', title: '物料类型', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'chda', |
| | | name: 'CHDACancel', |
| | | code: '1061', |
| | | component: () => import('@/views/zzmx/chda'), |
| | | meta: { code: '1061', title: '存货档案', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'wlqd', |
| | | name: 'WLQDCancel', |
| | | code: '1062', |
| | | component: () => import('@/views/zzmx/wlqd'), |
| | | meta: { code: '1062', title: '物料清单', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'gylx', |
| | | name: 'GYLXCancel', |
| | | code: '1063', |
| | | component: () => import('@/views/zzmx/gylx'), |
| | | meta: { code: '1063', title: '工艺路线', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'gxdy', |
| | | name: 'GXDYCancel', |
| | | code: '1064', |
| | | component: () => import('@/views/zzmx/gxdy'), |
| | | meta: { code: '1064', title: '工序定义', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'jpgj', |
| | | name: 'JPGJCancel', |
| | | code: '1065', |
| | | component: () => import('@/views/zzmx/jpgj'), |
| | | meta: { code: '1065', title: '节拍工价', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/scgl', |
| | | component: Layout, |
| | | redirect: '/scgl/scdd', |
| | | name: '生产管理', |
| | | code: '1006', |
| | | meta: { code: '1006', title: '生产管理', icon: 'production' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'scdd', |
| | | name: 'SCDDCancel', |
| | | code: '1070', |
| | | component: () => import('@/views/scgl/scdd'), |
| | | meta: { code: '1070', title: 'ERP生产订单', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'gd', |
| | | name: 'GDCancel', |
| | | code: '1071', |
| | | component: () => import('@/views/scgl/gd'), |
| | | meta: { code: '1071', title: 'MES工单', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'gdpg', |
| | | name: 'GDPDCancel', |
| | | code: '1072', |
| | | component: () => import('@/views/scgl/gdpg'), |
| | | meta: { code: '1072', title: '工单派工', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'sckbg', |
| | | name: 'SCKBGCancel', |
| | | code: '1073', |
| | | component: () => import('@/views/scgl/sckbg'), |
| | | meta: { code: '1073', title: '生产开报工', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'gdplgb', |
| | | name: 'GDPLGBCancel', |
| | | code: '1074', |
| | | component: () => import('@/views/scgl/gdplgb'), |
| | | meta: { code: '1074', title: 'MES工单批量关闭', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'cngh', |
| | | name: 'CNGHCancel', |
| | | code: '1075', |
| | | component: () => import('@/views/scgl/cngh'), |
| | | meta: { code: '1075', title: '产能规划', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'zdpc', |
| | | name: 'ZDPCCancel', |
| | | code: '1076', |
| | | component: () => import('@/views/scgl/zdpc'), |
| | | meta: { code: '1076', title: '自动排程', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/zlgl', |
| | | component: Layout, |
| | | redirect: '/zlgl/zjbz', |
| | | name: '质量管理', |
| | | code: '1007', |
| | | meta: { code: '1007', title: '质量管理', icon: 'quality' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'zjbz', |
| | | name: 'ZJBZCancel', |
| | | code: '1080', |
| | | component: () => import('@/views/zlgl/zjbz'), |
| | | meta: { code: '1080', title: '质检标准', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'qxdy', |
| | | name: 'QXDYCancel', |
| | | code: '1081', |
| | | component: () => import('@/views/zlgl/qxdy'), |
| | | meta: { code: '1081', title: '缺陷定义', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'gxjy', |
| | | name: 'GXDYCancel', |
| | | code: '1082', |
| | | component: () => import('@/views/zlgl/gxjy'), |
| | | meta: { code: '1082', title: '工序检验', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'wljy', |
| | | name: 'WLJYCancel', |
| | | code: '1083', |
| | | component: () => import('@/views/zlgl/wljy'), |
| | | meta: { code: '1083', title: '物流检验', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'qxsj', |
| | | name: 'QXSJCancel', |
| | | code: '1084', |
| | | component: () => import('@/views/zlgl/qxsj'), |
| | | meta: { code: '1084', title: '缺陷统计', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'gxjybz', |
| | | name: 'QXJYBZCancel', |
| | | code: '1085', |
| | | component: () => import('@/views/zlgl/gxjybz'), |
| | | meta: { code: '1085', title: '工序检验标准', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'gxjyxm', |
| | | name: 'GXJYXMCancel', |
| | | code: '1086', |
| | | component: () => import('@/views/zlgl/gxjyxm'), |
| | | meta: { code: '1086', title: '工序检验项目', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'gxjyjl', |
| | | name: 'GXJYJLCancel', |
| | | code: '1087', |
| | | component: () => import('@/views/zlgl/gxjyjl'), |
| | | meta: { code: '1087', title: '工序检验记录', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'zjfa', |
| | | name: 'ZJFACancel', |
| | | code: '1088', |
| | | component: () => import('@/views/zlgl/zjfa'), |
| | | meta: { code: '1088', title: '质检方案', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/bbgl', |
| | | component: Layout, |
| | | redirect: '/bbgl/sczxbb', |
| | | name: '报表管理', |
| | | code: '1008', |
| | | meta: { code: '1008', title: '报表管理', icon: 'bbgl' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'bzgztj', |
| | | name: 'BZGZTJCancel', |
| | | code: '1090', |
| | | component: () => import('@/views/bbgl/bzgz'), |
| | | meta: { code: '1090', title: '班组工资统计', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'rygz', |
| | | name: 'RYGZCancel', |
| | | code: '1091', |
| | | component: () => import('@/views/bbgl/rygz'), |
| | | meta: { code: '1091', title: '人员工资', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'wwgx', |
| | | name: 'WWGXCancel', |
| | | code: '1092', |
| | | component: () => import('@/views/bbgl/wwgx'), |
| | | meta: { code: '1092', title: '委外工序', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'blmx', |
| | | name: 'BLMXJCancel', |
| | | code: '1093', |
| | | component: () => import('@/views/bbgl/blmx'), |
| | | meta: { code: '1093', title: '不良明细', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'pzyc', |
| | | name: 'PZYCJCancel', |
| | | code: '1094', |
| | | component: () => import('@/views/bbgl/pzyc'), |
| | | meta: { code: '1094', title: '品质异常', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'wxmx', |
| | | name: 'WXMXJCancel', |
| | | code: '1095', |
| | | component: () => import('@/views/bbgl/wxmx'), |
| | | meta: { code: '1095', title: '维修明细', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'adbb', |
| | | name: 'ADBBJCancel', |
| | | code: '1096', |
| | | component: () => import('@/views/bbgl/adbb'), |
| | | meta: { code: '1096', title: '安灯报表', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/xtsz', |
| | | component: Layout, |
| | | redirect: '/xtsz/bmgz', |
| | | name: '系统设置', |
| | | code: '1009', |
| | | meta: { code: '1009', title: '系统设置', icon: 'xtsz' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'bmgz', |
| | | name: 'BMGZCancel', |
| | | code: '1101', |
| | | component: () => import('@/views/xtsz/bmgz'), |
| | | meta: { code: '1101', title: '编码规则', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'mmxg', |
| | | name: 'MMXGCancel', |
| | | code: '1102', |
| | | component: () => import('@/views/xtsz/mmxg'), |
| | | meta: { code: '1102', title: '密码修改', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'xtrz', |
| | | name: 'XTRZCancel', |
| | | code: '1103', |
| | | component: () => import('@/views/xtsz/xtrz'), |
| | | meta: { code: '1103', title: '系统日志', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'sc', |
| | | name: 'SCCancel', |
| | | code: '1104', |
| | | component: () => import('@/views/xtsz/sc'), |
| | | meta: { code: '1104', title: 'SOP上传', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'cjgg', |
| | | name: 'CJGGancel', |
| | | code: '1105', |
| | | component: () => import('@/views/xtsz/cjgg'), |
| | | meta: { code: '1105', title: '车间公告', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/cggl', |
| | | component: Layout, |
| | | redirect: '/cggl/cgdd', |
| | | name: '采购管理', |
| | | code: '1000', |
| | | meta: { code: '1000', title: '采购管理', icon: 'cggl' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'cgdd', |
| | | name: 'CGDDCancel', |
| | | code: '1201', |
| | | component: () => import('@/views/cggl/cgdd'), |
| | | meta: { code: '1201', title: '采购订单', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | // 上云模块 |
| | | export const asyncRoutesCloud = [ |
| | | // 1.系统管理(基础设置类) |
| | | { |
| | | path: '/systemSetting', |
| | |
| | | import { asyncRoutes, commonRoutes } from '@/router' |
| | | import {asyncRoutes, asyncRoutesCloud, commonRoutes} from '@/router' |
| | | import Layout from '@/layout' |
| | | import {getCookie} from "@/utils/auth"; |
| | | |
| | |
| | | let newRoutes |
| | | if (getCookie('cloud')) { |
| | | const arr = menu.map(i => i.code) |
| | | newRoutes = asyncRoutes.filter(i => { |
| | | newRoutes = asyncRoutesCloud.filter(i => { |
| | | if (arr.includes(i.code)) { |
| | | return i |
| | | } |
| | |
| | | :data="tableData" |
| | | :height="isExpandForm?(tableHeight-70):(tableHeight-30)+'px'" |
| | | border |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandForm?(tableHeight-70):(tableHeight-30)+'px',}" |
| | | highlight-current-row |
| | |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- :summary-method="getSummaries"--> |
| | | <!-- show-summary--> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | |
| | | :data="tableData2" |
| | | :height="isExpandForm?(tableHeight-70):(tableHeight-30)+'px'" |
| | | border |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandForm?(tableHeight-70):(tableHeight-30)+'px',}" |
| | | highlight-current-row |
| | |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- :summary-method="getSummaries"--> |
| | | <!-- show-summary--> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | |
| | | :data="tableData" |
| | | :height="isExpandForm?(tableHeight-80):(tableHeight-40)+'px'" |
| | | border |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandForm?(tableHeight-80):(tableHeight-40)+'px',}" |
| | | highlight-current-row |
| | |
| | | :data="tableData2" |
| | | :height="isExpandForm?(tableHeight-80):(tableHeight-40)+'px'" |
| | | border |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandForm?(tableHeight-80):(tableHeight-40)+'px',}" |
| | | highlight-current-row |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, this.tableDataTop.length <= 10 ? 1000 * 3 : 100) |
| | | }, this.tableDataTop.length <= 10 ? 1000 * 15 : 100) |
| | | }) |
| | | }, |
| | | // 获取左下table数据 |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, this.tableDataBottom.length <= 10 ? 1000 * 3 : 100) |
| | | }, this.tableDataBottom.length <= 10 ? 1000 * 15 : 100) |
| | | }) |
| | | }, |
| | | |
| | |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="cxjg" class="svg_class"/> |
| | | 产线加工中任务 |
| | | |
| | | <div style="display: flex;margin-left: 85px;"> |
| | | |
| | | <div class="circle" style="background-color: rgb(255 255 255)"></div> |
| | | <div style="margin-left: 10px" >未开始</div> |
| | | |
| | | <div class="circle" style="margin-left: 10px;background-color: blue;"></div> |
| | | <div style="margin-left: 10px" >开工</div> |
| | | |
| | | <div class="circleYellow" style="margin-left: 10px"></div> |
| | | <div style="margin-left: 10px" >执行中</div> |
| | | |
| | | <div class="circle" style="margin-left: 10px"></div> |
| | | <div style="margin-left: 10px" >完工</div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="lineContent horn"> |
| | | <div v-for="item in lineContent3" :key="item.workcode" class="kb_left_top_block"> |
| | |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="派发时间" |
| | | width="120" |
| | | width="140" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.lm_date.substring(0, 10) }}</div> |
| | |
| | | <el-table-column |
| | | prop="saleOrderCode" |
| | | label="销售订单号" |
| | | width="170" |
| | | width="190" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div> |
| | |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="加工单号" |
| | | width="190" |
| | | width="220" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | width="350" |
| | | width="320" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div> |
| | |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | width="105" |
| | | width="125" |
| | | /> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="完工数量" |
| | | width="105" |
| | | width="125" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | width="105" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="ng_qty"--> |
| | | <!-- label="不良数量"--> |
| | | <!-- width="105"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | label="完成率" |
| | | width="105" |
| | | width="134" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ parseFloat((row.good_qty * 100 / row.plan_qty).toFixed(2)) }}%</div> |
| | |
| | | } |
| | | |
| | | nowLoop++ |
| | | }, 1000 * 10) |
| | | }, 1000 * 20) |
| | | }) |
| | | }, |
| | | // 产线加工任务 左下数据 |
| | | getLeftBottomData() { |
| | | let startValue = 0 // 初始值 |
| | | const scale = 10// 刻度 |
| | | // let startValue = 0 // 初始值 |
| | | // const scale = 10// 刻度 |
| | | // |
| | | // LineSearchBottomLeftData({shopcode: this.ShopArr.join(',')}).then(res => { |
| | | // this.tableDataLeftBottomTemp = res.data |
| | | // this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | // |
| | | // const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// 需要循环的次数 |
| | | // let nowLoop = 0// 当前循环的次数 |
| | | // |
| | | // const timer = setInterval(() => { |
| | | // startValue = startValue + scale |
| | | // this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | // if (nowLoop === loop) { |
| | | // clearInterval(timer) |
| | | // this.getLeftBottomData() |
| | | // } |
| | | // |
| | | // nowLoop++ |
| | | // }, 1000 * 15) |
| | | // }) |
| | | |
| | | LineSearchBottomLeftData({shopcode: this.ShopArr.join(',')}).then(res => { |
| | | this.tableDataLeftBottomTemp = res.data |
| | | this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => { |
| | | this.tableDataLeftBottom = res.data |
| | | |
| | | const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// 需要循环的次数 |
| | | let nowLoop = 0// 当前循环的次数 |
| | | const divData = this.$refs.tableDataLeftBottomRef.bodyWrapper |
| | | // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素) |
| | | const aaa = setInterval(() => { |
| | | // 元素自增距离顶部1像素 |
| | | divData.scrollTop += 1 |
| | | // divData.scrollTop += divData.scrollHeight / this.tableData.length |
| | | // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) |
| | | if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { |
| | | // 重置table距离顶部距离 |
| | | divData.scrollTop = 0 |
| | | LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => { |
| | | this.tableDataLeftBottom = res.data |
| | | |
| | | const timer = setInterval(() => { |
| | | startValue = startValue + scale |
| | | this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | if (nowLoop === loop) { |
| | | clearInterval(timer) |
| | | this.getLeftBottomData() |
| | | if (this.tableDataLeftBottom.length > 10) { |
| | | clearInterval(aaa) |
| | | this.getLeftBottomData() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | nowLoop++ |
| | | }, 1000 * 10) |
| | | }, this.tableDataLeftBottom.length <= 10 ? 1000 * 15 : 100) |
| | | }) |
| | | }, |
| | | |
| | |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | ::v-deep .el-table__body-wrapper{ |
| | | overflow: hidden !important; |
| | | } |
| | | |
| | | .circle { |
| | | width: 26px; |
| | | height: 26px; |
| | | background-color: #00ff8b; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | </style> |
| | | |
| | | <!--星空--> |
| | |
| | | <div class="smallTitle"> |
| | | <svg-icon icon-class="cxjg" class="svg_class"/> |
| | | 产线加工中任务 |
| | | |
| | | <div style="display: flex;margin-left: 85px;"> |
| | | |
| | | <div class="circle" style="background-color: rgb(255 255 255)"></div> |
| | | <div style="margin-left: 10px" >未开始</div> |
| | | |
| | | <div class="circle" style="margin-left: 10px;background-color: blue;"></div> |
| | | <div style="margin-left: 10px" >开工</div> |
| | | |
| | | <div class="circleYellow" style="margin-left: 10px"></div> |
| | | <div style="margin-left: 10px" >执行中</div> |
| | | |
| | | <div class="circle" style="margin-left: 10px"></div> |
| | | <div style="margin-left: 10px" >完工</div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="lineContent horn"> |
| | | <div v-for="item in lineContent3" :key="item.workcode" class="kb_left_top_block"> |
| | |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="派发时间" |
| | | width="120" |
| | | width="140" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.lm_date.substring(0, 10) }}</div> |
| | |
| | | <el-table-column |
| | | prop="saleOrderCode" |
| | | label="销售订单号" |
| | | width="170" |
| | | width="190" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div> |
| | |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="加工单号" |
| | | width="190" |
| | | width="220" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | width="350" |
| | | width="320" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div> |
| | |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | width="105" |
| | | width="125" |
| | | /> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="完工数量" |
| | | width="105" |
| | | width="125" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | width="105" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="ng_qty"--> |
| | | <!-- label="不良数量"--> |
| | | <!-- width="105"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | label="完成率" |
| | | width="105" |
| | | width="134" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ parseFloat((row.good_qty * 100 / row.plan_qty).toFixed(2)) }}%</div> |
| | |
| | | }, |
| | | // 产线加工任务 左下数据 |
| | | getLeftBottomData() { |
| | | let startValue = 0 // 初始值 |
| | | const scale = 10// 刻度 |
| | | // let startValue = 0 // 初始值 |
| | | // const scale = 10// 刻度 |
| | | // |
| | | // LineSearchBottomLeftData({shopcode: this.ShopArr.join(',')}).then(res => { |
| | | // this.tableDataLeftBottomTemp = res.data |
| | | // this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | // |
| | | // const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// 需要循环的次数 |
| | | // let nowLoop = 0// 当前循环的次数 |
| | | // |
| | | // const timer = setInterval(() => { |
| | | // startValue = startValue + scale |
| | | // this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | // if (nowLoop === loop) { |
| | | // clearInterval(timer) |
| | | // this.getLeftBottomData() |
| | | // } |
| | | // |
| | | // nowLoop++ |
| | | // }, 1000 * 10) |
| | | // }) |
| | | LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => { |
| | | this.tableDataLeftBottom = res.data |
| | | |
| | | LineSearchBottomLeftData({shopcode: this.ShopArr.join(',')}).then(res => { |
| | | this.tableDataLeftBottomTemp = res.data |
| | | this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | const divData = this.$refs.tableDataLeftBottomRef.bodyWrapper |
| | | // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素) |
| | | const aaa = setInterval(() => { |
| | | // 元素自增距离顶部1像素 |
| | | divData.scrollTop += 1 |
| | | // divData.scrollTop += divData.scrollHeight / this.tableData.length |
| | | // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) |
| | | if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { |
| | | // 重置table距离顶部距离 |
| | | divData.scrollTop = 0 |
| | | LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => { |
| | | this.tableDataLeftBottom = res.data |
| | | |
| | | const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// 需要循环的次数 |
| | | let nowLoop = 0// 当前循环的次数 |
| | | |
| | | const timer = setInterval(() => { |
| | | startValue = startValue + scale |
| | | this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale) |
| | | if (nowLoop === loop) { |
| | | clearInterval(timer) |
| | | this.getLeftBottomData() |
| | | if (this.tableDataLeftBottom.length > 10) { |
| | | clearInterval(aaa) |
| | | this.getLeftBottomData() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | nowLoop++ |
| | | }, 1000 * 10) |
| | | }, this.tableDataLeftBottom.length <= 10 ? 1000 * 15 : 100) |
| | | }) |
| | | }, |
| | | |
| | |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | ::v-deep .el-table__body-wrapper{ |
| | | overflow: hidden !important; |
| | | } |
| | | |
| | | .circle { |
| | | width: 26px; |
| | | height: 26px; |
| | | background-color: #00ff8b; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | </style> |
| | | |
| | | <!--星空--> |
| | |
| | | async getBar01() { |
| | | // const res=await xxx() |
| | | let data = [ |
| | | { key: 'admin0', value: 300 }, |
| | | { key: 'admin1', value: 310 }, |
| | | { key: 'admin2', value: 180 }, |
| | | { key: 'admin3', value: 190 }, |
| | | { key: 'admin4', value: 120 }, |
| | | { key: 'admin5', value: 230 }, |
| | | { key: 'admin6', value: 270 }, |
| | | { key: 'admin7', value: 250 }, |
| | | { key: 'admin8', value: 260 }, |
| | | { key: 'admin9', value: 180 } |
| | | { key: '石文超', value: 300 }, |
| | | { key: '王俊', value: 310 }, |
| | | { key: '温顺', value: 180 }, |
| | | { key: '陈云科', value: 190 }, |
| | | { key: '杜群冬', value: 120 }, |
| | | { key: '朱国兵', value: 230 }, |
| | | { key: '田兴来', value: 270 }, |
| | | { key: '李伟', value: 250 }, |
| | | { key: '杨胜刚', value: 260 }, |
| | | { key: '潘臻', value: 180 } |
| | | ] |
| | | data = data.sort((a, b) => b.value - a.value) |
| | | loadEcharts('bar01', bar01(data)) |