quanxianpeizhi
This commit is contained in:
parent
b7f0828225
commit
4c906f37c8
|
@ -19,7 +19,7 @@
|
|||
@expand-change="handlerExpand"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column label="任务编号" min-width="140" show-overflow-tooltip>
|
||||
<el-table-column label="任务编号" min-width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.name">{{scope.row.name}}</span>
|
||||
<span v-else></span>
|
||||
|
@ -27,7 +27,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="productName" min-width="120" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品型号" prop="productNum">
|
||||
<el-table-column label="产品型号" prop="productNum" min-width="120" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
@expand-change="handlerExpand"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column label="任务编号" prop="name" width="140" show-overflow-tooltip>
|
||||
<el-table-column label="任务编号" prop="name" width="120" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="productName" width="120" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品型号" prop="productNum">
|
||||
<el-table-column label="产品型号" prop="productNum" width="120" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产数量" prop="per">
|
||||
<el-table-column label="生产数量" prop="per" width="80" >
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
|
|
@ -453,7 +453,7 @@
|
|||
if (item.children.length > 0) {
|
||||
item.children.forEach((k, i) => {
|
||||
k.planTime = [k.startTime, k.endTime];
|
||||
k.top = item.top + i * 34 + 35;
|
||||
k.top = item.top + i * 35 + 36;
|
||||
k.isShow = true;
|
||||
k.left = this.computedTimeWidth(k.startTime);
|
||||
k.widthMe = k.widthChild = this.computedTimeWidth(k.startTime, k.endTime, k);
|
||||
|
@ -463,13 +463,13 @@
|
|||
} else {
|
||||
if (list[index - 1].type == 3) {
|
||||
item.top =
|
||||
list[index - 1].top + list[index - 1].children.length * 34 + 35;
|
||||
list[index - 1].top + list[index - 1].children.length * 36 + 36;
|
||||
if (item.type == 3) {
|
||||
item.isexpand = true;
|
||||
if (item.children.length > 0) {
|
||||
item.children.forEach((z, o) => {
|
||||
z.planTime = [z.startTime, z.endTime];
|
||||
z.top = item.top + o * 34 + 35;
|
||||
z.top = item.top + o * 35 + 36;
|
||||
z.isShow = true;
|
||||
z.left = this.computedTimeWidth(z.startTime);
|
||||
z.widthMe = z.widthChild = this.computedTimeWidth(z.startTime, z.endTime, z);
|
||||
|
@ -477,7 +477,7 @@
|
|||
}
|
||||
}
|
||||
} else {
|
||||
item.top = list[index - 1].top + 35;
|
||||
item.top = list[index - 1].top + 36;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -538,14 +538,14 @@
|
|||
},
|
||||
//修改后续高度
|
||||
resetTop(zindex, reduce, isexpand) {
|
||||
let num = reduce ? -34 : 34;
|
||||
let num = reduce ? -36 : 36;
|
||||
if (!reduce && !isexpand) {
|
||||
this.list.forEach((item, index) => {
|
||||
if (index > zindex) {
|
||||
item.top = item.top + 35;
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((k, i) => {
|
||||
k.top = item.top + 34 * i + 35;
|
||||
k.top = item.top + 34 * i + 7;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -556,7 +556,7 @@
|
|||
item.top = item.top + num * this.list[zindex].children.length;
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((k, i) => {
|
||||
k.top = item.top + 40 * i + 40;
|
||||
k.top = item.top + 35 * i + 35;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -566,10 +566,10 @@
|
|||
retDelTop(zindex, length) {
|
||||
this.list.forEach((item, index) => {
|
||||
if (index >= zindex) {
|
||||
item.top = item.top - 40 * length;
|
||||
item.top = item.top - 36 * length;
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((k, i) => {
|
||||
k.top = item.top + 40 * i + 40;
|
||||
k.top = item.top + 36 * i + 36;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1186,26 +1186,26 @@
|
|||
|
||||
.group {
|
||||
position: absolute;
|
||||
background-color: #909090 !important;
|
||||
background-color: #98c3f1 !important;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
height: 14px !important;
|
||||
line-height: 14px !important;
|
||||
height: 20px !important;
|
||||
line-height: 20px !important;
|
||||
// margin-top: 5px;
|
||||
clip-path: polygon(
|
||||
/*clip-path: polygon(
|
||||
100% 0,
|
||||
100% 100%,
|
||||
calc(100% - 8px) 60%,
|
||||
8px 60%,
|
||||
0 100%,
|
||||
0 0
|
||||
);
|
||||
);*/
|
||||
// > div {
|
||||
// -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
// }
|
||||
.progress {
|
||||
// width: 50px;
|
||||
background-color: #606060 !important;
|
||||
background-color: #0c96f9 !important;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1185,26 +1185,26 @@
|
|||
|
||||
.group {
|
||||
position: absolute;
|
||||
background-color: #909090 !important;
|
||||
background-color: #98c3f1 !important;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
height: 14px !important;
|
||||
line-height: 14px !important;
|
||||
height: 20px !important;
|
||||
line-height: 20px !important;
|
||||
// margin-top: 5px;
|
||||
clip-path: polygon(
|
||||
/*clip-path: polygon(
|
||||
100% 0,
|
||||
100% 100%,
|
||||
calc(100% - 8px) 60%,
|
||||
8px 60%,
|
||||
0 100%,
|
||||
0 0
|
||||
);
|
||||
);*/
|
||||
// > div {
|
||||
// -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
// }
|
||||
.progress {
|
||||
// width: 50px;
|
||||
background-color: #606060 !important;
|
||||
background-color: #0c96f9 !important;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,18 +64,24 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
let hasToken = getToken();
|
||||
/*debugger;
|
||||
console.log(hasToken);*/
|
||||
if (hasToken) {
|
||||
this.$store.dispatch("user/getCount", {});
|
||||
}
|
||||
/*this.timer = window.setInterval(() => {
|
||||
setTimeout(() => {
|
||||
if (hasToken) {
|
||||
this.$store.dispatch("user/getCount", {});
|
||||
}
|
||||
},0)
|
||||
},5000)*/
|
||||
// this.refreshCountData();
|
||||
},
|
||||
methods: {
|
||||
refreshCountData(){
|
||||
let hasToken = getToken();
|
||||
this.timer = window.setInterval(() => {
|
||||
setTimeout(() => {
|
||||
if (hasToken) {
|
||||
this.$store.dispatch("user/getCount", {});
|
||||
}
|
||||
},0)
|
||||
},5000)
|
||||
},
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||
},
|
||||
|
|
|
@ -49,13 +49,13 @@ export const constantRoutes = [
|
|||
path: 'dashboard',
|
||||
name: 'Dashboard',
|
||||
component: () => import('@/views/dashboard/index'),
|
||||
meta: { title: '首页', icon: 'home', affix: true,keepAlive: false }
|
||||
meta: { title: '首页', icon: 'home', affix: true,keepAlive: false , perms: ['dashboard'] }
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/index',
|
||||
component: () => import('@/views/bigScreen/index'),
|
||||
meta: { title: '大屏', icon: 'bigScreen', affix: true,keepAlive: false }
|
||||
meta: { title: '大屏', icon: 'bigScreen', affix: true,keepAlive: false , perms: ['bigScreen'] }
|
||||
},
|
||||
{
|
||||
path: '/changepassword',
|
||||
|
@ -165,14 +165,14 @@ export const asyncRoutes = [
|
|||
path: 'plan',
|
||||
name: 'plan',
|
||||
component: () => import('@/views/pm/plan'),
|
||||
meta: { title: '生产计划管理', icon: 'productionPlan', perms: ['index_manage'] }
|
||||
meta: { title: '生产计划管理', icon: 'productionPlan', perms: ['pm_plan'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'work/:id',
|
||||
name: 'work',
|
||||
component: () => import('@/views/pm/work'),
|
||||
meta: { title: '生产子计划', perms: ['vendor_manage'] },
|
||||
meta: { title: '生产子计划', perms: ['pm_plan'] },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
|
@ -186,14 +186,14 @@ export const asyncRoutes = [
|
|||
path: 'management',
|
||||
name: 'management',
|
||||
component: () => import('@/views/pm/management'),
|
||||
meta: { title: '生产任务管理', icon: 'productionTask', perms: ['pm_resources'] }
|
||||
meta: { title: '生产任务管理', icon: 'productionTask', perms: ['pm_testitem'] }
|
||||
},
|
||||
|
||||
{
|
||||
path: 'plandetails/:id',
|
||||
name: 'plandetails',
|
||||
component: () => import('@/views/pm/plandetails'),
|
||||
meta: { title: '生产任务详情', perms: ['vendor_manage'] },
|
||||
meta: { title: '生产任务详情', perms: ['pm_testitem'] },
|
||||
hidden: true
|
||||
}
|
||||
,
|
||||
|
@ -219,13 +219,13 @@ export const asyncRoutes = [
|
|||
path: 'worktask',
|
||||
name: 'worktask',
|
||||
component: () => import('@/views/wpm/worktask'),
|
||||
meta: { title: '车间任务', icon: 'workshopTask', perms: ['index_manage'] }
|
||||
meta: { title: '车间任务', icon: 'workshopTask', perms: ['wpm_worktask'] }
|
||||
},
|
||||
{
|
||||
path: 'operation',
|
||||
name: 'operation',
|
||||
component: () => import('@/views/wpm/operation'),
|
||||
meta: { title: '车间操作', icon: 'workshopOperation', perms: ['index_manage'] }
|
||||
meta: { title: '车间操作', icon: 'workshopOperation', perms: ['wpm_operation'] }
|
||||
},
|
||||
{
|
||||
path: 'operationdo/:id',
|
||||
|
@ -238,19 +238,19 @@ export const asyncRoutes = [
|
|||
path: 'need',
|
||||
name: 'need',
|
||||
component: () => import('@/views/wpm/need'),
|
||||
meta: { title: '过程检验', icon: 'processTest', perms: ['index_manage'] }
|
||||
meta: { title: '过程检验', icon: 'processTest', perms: ['wpm_need'] }
|
||||
},
|
||||
{
|
||||
path: 'productjy',
|
||||
name: 'productjy',
|
||||
component: () => import('@/views/wpm/productjy'),
|
||||
meta: { title: '成品检验', icon: 'finishedCheck', perms: ['index_manage'] }
|
||||
meta: { title: '成品检验', icon: 'finishedCheck', perms: ['wpm_productjy'] }
|
||||
},
|
||||
{
|
||||
path: 'firstCheck',
|
||||
name: 'firstCheck',
|
||||
component: () => import('@/views/wpm/firstCheck'),
|
||||
meta: { title: '首件确认', icon: 'finishedCheck', perms: ['index_manage'] }
|
||||
meta: { title: '首件确认', icon: 'finishedCheck', perms: ['wpm_firstCheck'] }
|
||||
}
|
||||
|
||||
]
|
||||
|
@ -287,26 +287,26 @@ export const asyncRoutes = [
|
|||
component: Layout,
|
||||
redirect: '/sam/customer',
|
||||
name: 'sam',
|
||||
meta: { title: '销售管理', icon: 'sale', perms: ['equipment_set'] },
|
||||
meta: { title: '销售管理', icon: 'sale', perms: ['sam_manage'] },
|
||||
children: [
|
||||
{
|
||||
path: 'customer',
|
||||
name: 'customer',
|
||||
component: () => import('@/views/sam/customer'),
|
||||
meta: { title: '客户管理', icon: 'customer', perms: ['index_manage'] }
|
||||
meta: { title: '客户管理', icon: 'customer', perms: ['sam_customer'] }
|
||||
},
|
||||
{
|
||||
path: 'contract',
|
||||
name: 'contract',
|
||||
component: () => import('@/views/sam/contract'),
|
||||
meta: { title: '合同管理', icon: 'contract', perms: ['index_manage'] }
|
||||
meta: { title: '合同管理', icon: 'contract', perms: ['sam_contract'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'contractdetail/:id',
|
||||
name: 'contractdetail',
|
||||
component: () => import('@/views/sam/contractdetail'),
|
||||
meta: { title: '合同详情', perms: ['vendor_manage'] },
|
||||
meta: { title: '合同详情', perms: ['sam_contract'] },
|
||||
hidden: true
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,7 @@ export const asyncRoutes = [
|
|||
path: 'order',
|
||||
name: 'order',
|
||||
component: () => import('@/views/sam/order'),
|
||||
meta: { title: '订单管理', icon: 'order', perms: ['index_manage'] }
|
||||
meta: { title: '订单管理', icon: 'order', perms: ['sam_order'] }
|
||||
}
|
||||
|
||||
,
|
||||
|
@ -323,21 +323,21 @@ export const asyncRoutes = [
|
|||
path: 'orderdetail/:id',
|
||||
name: 'orderdetail',
|
||||
component: () => import('@/views/sam/orderdetail'),
|
||||
meta: { title: '订单详情', perms: ['vendor_manage'] },
|
||||
meta: { title: '订单详情', perms: ['sam_order'] },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'sales',
|
||||
name: 'sales',
|
||||
component: () => import('@/views/sam/sales'),
|
||||
meta: { title: '销售信息', icon: 'saleInfo', perms: ['index_manage'] }
|
||||
meta: { title: '销售信息', icon: 'saleInfo', perms: ['sam_sales'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'salesdetail/:id',
|
||||
name: 'salesdetail',
|
||||
component: () => import('@/views/sam/salesdetail'),
|
||||
meta: { title: '销售详情', perms: ['vendor_manage'] },
|
||||
meta: { title: '销售详情', perms: ['sam_sales'] },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
|
@ -347,33 +347,33 @@ export const asyncRoutes = [
|
|||
component: Layout,
|
||||
redirect: '/qm/product',
|
||||
name: 'qm',
|
||||
meta: { title: '检验管理', icon: 'test', perms: ['equipment_set'] },
|
||||
meta: { title: '检验管理', icon: 'test', perms: ['qm_manage'] },
|
||||
children: [
|
||||
{
|
||||
path: 'product',
|
||||
name: 'product',
|
||||
component: () => import('@/views/qm/product'),
|
||||
meta: { title: '军检', icon: 'check', perms: ['index_manage'] }
|
||||
meta: { title: '军检', icon: 'check', perms: ['qm_product'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'admissiontest',
|
||||
name: 'admissiontest',
|
||||
component: () => import('@/views/qm/admissiontest'),
|
||||
meta: { title: '入厂检验', icon: 'check', perms: ['index_manage'] }
|
||||
meta: { title: '入厂检验', icon: 'check', perms: ['qm_admissiontest'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'processtest',
|
||||
name: 'processtest',
|
||||
component: () => import('@/views/qm/processtest'),
|
||||
meta: { title: '过程检验', icon: 'processTest', perms: ['index_manage'] }
|
||||
meta: { title: '过程检验', icon: 'processTest', perms: ['qm_processtest'] }
|
||||
},
|
||||
{
|
||||
path: 'taskdetails/:id',
|
||||
name: 'taskdetails',
|
||||
component: () => import('@/views/qm/taskdetails'),
|
||||
meta: { title: '过程检验详情', perms: ['vendor_manage'] },
|
||||
meta: { title: '过程检验详情', perms: ['qm_processtest'] },
|
||||
hidden: true
|
||||
}
|
||||
,
|
||||
|
@ -397,13 +397,13 @@ export const asyncRoutes = [
|
|||
path: 'producttest',
|
||||
name: 'producttest',
|
||||
component: () => import('@/views/qm/producttest'),
|
||||
meta: { title: '成品检验', icon: 'finishedCheck', perms: ['index_manage'] }
|
||||
meta: { title: '成品检验', icon: 'finishedCheck', perms: ['qm_producttest'] }
|
||||
},
|
||||
{
|
||||
path: 'unproduct',
|
||||
name: 'unproduct',
|
||||
component: () => import('@/views/qm/unproduct'),
|
||||
meta: { title: '不合格品', icon: 'unqualified', perms: ['index_manage'] }
|
||||
meta: { title: '不合格品', icon: 'unqualified', perms: ['qm_unproduct'] }
|
||||
}
|
||||
|
||||
]
|
||||
|
@ -419,18 +419,18 @@ export const asyncRoutes = [
|
|||
path: 'user',
|
||||
name: 'user',
|
||||
component: () => import('@/views/personnel/user'),
|
||||
meta: { title: '人员列表', icon: 'userList', perms: ['user_manage'] }
|
||||
meta: { title: '人员列表', icon: 'userList', perms: ['personnel_user'] }
|
||||
},
|
||||
{
|
||||
path: 'attendance',
|
||||
name: 'attendance',
|
||||
component: () => import('@/views/personnel/attendance'),
|
||||
meta: { title: '考勤列表', icon: 'attendance', perms: ['attendance_manage'] }
|
||||
meta: { title: '考勤列表', icon: 'attendance', perms: ['personnel_attendance'] }
|
||||
} ,{
|
||||
path: 'userupdate/:id',
|
||||
name: 'userupdate',
|
||||
component: () => import('@/views/personnel/userupdate'),
|
||||
meta: { title: '人员信息详情', icon: 'home', perms: ['employee_detail'] },
|
||||
meta: { title: '人员信息详情', icon: 'home' },
|
||||
hidden: true
|
||||
},
|
||||
|
||||
|
@ -441,13 +441,13 @@ export const asyncRoutes = [
|
|||
component: Layout,
|
||||
redirect: '/inm/warehouse',
|
||||
name: 'inm',
|
||||
meta: { title: '库存管理', icon: 'stock', perms: ['equipment_set'] },
|
||||
meta: { title: '库存管理', icon: 'stock', perms: ['inm_manage'] },
|
||||
children: [
|
||||
{
|
||||
path: 'warehouse',
|
||||
name: 'warehouse',
|
||||
component: () => import('@/views/inm/warehouse'),
|
||||
meta: { title: '仓库', icon: 'warehouse', perms: ['index_manage'] }
|
||||
meta: { title: '仓库', icon: 'warehouse', perms: ['inm_warehouse'] }
|
||||
},
|
||||
{
|
||||
path: 'inventory/:id',
|
||||
|
@ -461,13 +461,13 @@ export const asyncRoutes = [
|
|||
path: 'materialbatch',
|
||||
name: 'materialbatch',
|
||||
component: () => import('@/views/inm/materialbatch'),
|
||||
meta: { title: '物料批次', icon: 'materialbatch', perms: ['index_manage'] }
|
||||
meta: { title: '物料批次', icon: 'materialbatch', perms: ['inm_MaterialBatch'] }
|
||||
},
|
||||
{
|
||||
path: 'fifo',
|
||||
name: 'fifo',
|
||||
component: () => import('@/views/inm/fifo'),
|
||||
meta: { title: '出入库记录', icon: 'home', perms: ['index_manage'] }
|
||||
meta: { title: '出入库记录', icon: 'home', perms: ['inm_fifo'] }
|
||||
},
|
||||
{
|
||||
path: 'fifodetail/:id',
|
||||
|
@ -480,13 +480,13 @@ export const asyncRoutes = [
|
|||
path: 'wproduct',
|
||||
name: 'wproduct',
|
||||
component: () => import('@/views/inm/wproduct'),
|
||||
meta: { title: '半成品库', icon: 'wproduct', perms: ['index_manage'] }
|
||||
meta: { title: '半成品库', icon: 'wproduct', perms: ['inm_wproduct'] }
|
||||
},
|
||||
{
|
||||
path: 'product',
|
||||
name: 'product',
|
||||
component: () => import('@/views/inm/product'),
|
||||
meta: { title: '成品库', icon: 'finishedProduct', perms: ['index_manage'] }
|
||||
meta: { title: '成品库', icon: 'finishedProduct', perms: ['inm_product'] }
|
||||
},
|
||||
|
||||
]
|
||||
|
@ -496,25 +496,25 @@ export const asyncRoutes = [
|
|||
component: Layout,
|
||||
redirect: '/procurement/vendor',
|
||||
name: 'procurement',
|
||||
meta: { title: '采购管理', icon: 'purchase', perms: ['procurement_set'] },
|
||||
meta: { title: '采购管理', icon: 'purchase', perms: ['procurement_manage'] },
|
||||
children: [
|
||||
{
|
||||
path: 'vendor',
|
||||
name: 'vendor',
|
||||
component: () => import('@/views/procurement/vendor'),
|
||||
meta: { title: '供应商', icon: 'supplier', perms: ['vendor_manage'] }
|
||||
meta: { title: '供应商', icon: 'supplier', perms: ['procurement_vendor'] }
|
||||
},
|
||||
{
|
||||
path: 'puorder',
|
||||
name: 'puorder',
|
||||
component: () => import('@/views/procurement/puorder'),
|
||||
meta: { title: '采购订单', icon: 'purchaseOrder', perms: ['vendor_manage'] }
|
||||
meta: { title: '采购订单', icon: 'purchaseOrder', perms: ['procurement_puorder'] }
|
||||
},
|
||||
{
|
||||
path: 'puorderitem/:id',
|
||||
name: 'puorderitem',
|
||||
component: () => import('@/views/procurement/puorderitem'),
|
||||
meta: { title: '采购订单项', perms: ['vendor_manage'] },
|
||||
meta: { title: '采购订单项', perms: ['procurement_puorder'] },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
|
@ -524,25 +524,25 @@ export const asyncRoutes = [
|
|||
component: Layout,
|
||||
redirect: '/statistics/progressStatistics',
|
||||
name: 'statistics',
|
||||
meta: { title: '统计分析', icon: 'statistics', perms: ['workflow_manage'] },
|
||||
meta: { title: '统计分析', icon: 'statistics', perms: ['statistics_manage'] },
|
||||
children: [
|
||||
{
|
||||
path: 'progressStatistics',
|
||||
name: 'progressStatistics',
|
||||
component: () => import('@/views/statistics/progressStatistics'),
|
||||
meta: { title: '进度统计', icon: 'progressStatistics', perms: ['workflow_index'] }
|
||||
meta: { title: '进度统计', icon: 'progressStatistics', perms: ['statistics_progressStatistics'] }
|
||||
},
|
||||
{
|
||||
path: 'materialStatistics',
|
||||
name: 'materialStatistics',
|
||||
component: () => import('@/views/statistics/materialStatistics'),
|
||||
meta: { title: '物料统计', icon: 'materialStatistics', perms: ['workflow_index'] }
|
||||
meta: { title: '物料统计', icon: 'materialStatistics', perms: ['statistics_materialStatistics'] }
|
||||
},
|
||||
{
|
||||
path: 'personStatistics',
|
||||
name: 'personStatistics',
|
||||
component: () => import('@/views/statistics/personStatistics'),
|
||||
meta: { title: '人员统计', icon: 'personStatistics', perms: ['workflow_index'] }
|
||||
meta: { title: '人员统计', icon: 'personStatistics', perms: ['statistics_personStatistics'] }
|
||||
},
|
||||
{
|
||||
path: 'costStatistics',
|
||||
|
@ -666,7 +666,7 @@ export const asyncRoutes = [
|
|||
component: Layout,
|
||||
redirect: '/monitor/service',
|
||||
name: 'Monitor',
|
||||
meta: { title: '系统监控', icon: 'home', perms: ['monitor_set'] },
|
||||
meta: { title: '系统监控', icon: 'home', perms: ['service_manage'] },
|
||||
children: [
|
||||
{
|
||||
path: 'service',
|
||||
|
|
|
@ -348,6 +348,7 @@
|
|||
import {getpEquipmentList} from "@/api/equipment";
|
||||
import {getProcessYield ,getPlanGantt} from "@/api/srm";
|
||||
import {getContractList , getOrderList} from "@/api/sam";
|
||||
import { getToken } from '@/utils/auth' // get token from cookie
|
||||
export default {
|
||||
components: {gantt},
|
||||
name: 'Dashboard',
|
||||
|
@ -997,6 +998,36 @@
|
|||
}
|
||||
|
||||
},
|
||||
refreshDataFrequently(){
|
||||
let that = this;
|
||||
let hasToken = getToken();
|
||||
this.timer = window.setInterval(() => {
|
||||
setTimeout(() => {
|
||||
if (hasToken) {
|
||||
that.getUserList();//用户列表
|
||||
that.getEquipmentList();//设备列表
|
||||
that.getGanttData();//甘特图数据
|
||||
that.getStatisticsData();//统计数据
|
||||
that.getNoticeData();//提醒列表
|
||||
}
|
||||
},0)
|
||||
},120000)//2分钟
|
||||
},
|
||||
refreshDataSlowly(){
|
||||
let that = this;
|
||||
let hasToken = getToken();
|
||||
this.timer = window.setInterval(() => {
|
||||
setTimeout(() => {
|
||||
if (hasToken) {
|
||||
that.getUserList();//用户列表
|
||||
that.getEquipmentList();//设备列表
|
||||
that.getGanttData();//甘特图数据
|
||||
that.getStatisticsData();//统计数据
|
||||
that.getNoticeData();//提醒列表
|
||||
}
|
||||
},0)
|
||||
},3600000)//1小时1000*10*60
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||
|
@ -1010,7 +1041,19 @@
|
|||
this.getGanttData();//甘特图数据
|
||||
this.getStatisticsData();//统计数据
|
||||
this.getNoticeData();//提醒列表
|
||||
// this.refreshCountData();
|
||||
let nowDate = new Date();
|
||||
let nowHour = nowDate.getHours();
|
||||
if(nowHour>7&&nowHour<10){
|
||||
this.refreshDataFrequently();
|
||||
}else{
|
||||
this.refreshDataSlowly();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -153,8 +153,8 @@
|
|||
this.$store
|
||||
.dispatch("user/login", this.loginForm)
|
||||
.then(() => {
|
||||
this.$store.dispatch("user/getCount", {})
|
||||
this.$router.push({ path: this.redirect || "/" });
|
||||
this.$store.dispatch("user/getCount", {});
|
||||
this.$router.push({ path: this.redirect || "/" }, () => {});
|
||||
this.loading = false;
|
||||
localStorage.setItem("rem_username", this.loginForm.username);
|
||||
localStorage.setItem("rem_password", this.loginForm.password);
|
||||
|
@ -181,51 +181,6 @@
|
|||
this.limitedPhoto = true;
|
||||
this.openTheCamera();
|
||||
},
|
||||
/*打开相机*/
|
||||
openTheCamera () {
|
||||
this.$nextTick(function () {
|
||||
let _this = this;
|
||||
this.thisVideo = document.getElementById('videoCamera');
|
||||
// 旧版本浏览器可能根本不支持mediaDevices,我们首先设置一个空对象
|
||||
if (navigator.mediaDevices === undefined) {
|
||||
navigator.mediaDevices = {}
|
||||
}
|
||||
// 一些浏览器实现了部分mediaDevices,我们不能只分配一个对象
|
||||
// 使用getUserMedia,因为它会覆盖现有的属性。
|
||||
// 这里,如果缺少getUserMedia属性,就添加它。
|
||||
if (navigator.mediaDevices.getUserMedia === undefined) {
|
||||
navigator.mediaDevices.getUserMedia = function (constraints) {
|
||||
// 首先获取现存的getUserMedia(如果存在)
|
||||
let getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.getUserMedia;
|
||||
// 有些浏览器不支持,会返回错误信息
|
||||
// 保持接口一致
|
||||
if (!getUserMedia) {
|
||||
return Promise.reject(new Error('getUserMedia is not implemented in this browser'))
|
||||
}
|
||||
// 否则,使用Promise将调用包装到旧的navigator.getUserMedia
|
||||
return new Promise(function (resolve, reject) {
|
||||
getUserMedia.call(navigator, constraints, resolve, reject)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
let constraints = { audio: false, video: { width: this.videoWidth, height: this.videoHeight, transform: 'scaleX(-1)' } };
|
||||
navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {
|
||||
// 旧的浏览器可能没有srcObject
|
||||
if ('srcObject' in _this.thisVideo) {
|
||||
_this.thisVideo.srcObject = stream
|
||||
} else {
|
||||
// 避免在新的浏览器中使用它,因为它正在被弃用。
|
||||
_this.thisVideo.src = window.URL.createObjectURL(stream)
|
||||
}
|
||||
_this.thisVideo.onloadedmetadata = function (e) {
|
||||
_this.thisVideo.play();
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
});
|
||||
},
|
||||
/*关闭相机*/
|
||||
closeCamera () {
|
||||
debugger;
|
||||
|
|
|
@ -1275,26 +1275,26 @@
|
|||
|
||||
.group {
|
||||
position: absolute;
|
||||
background-color: #909090 !important;
|
||||
background-color: #98c3f1 !important;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
height: 14px !important;
|
||||
line-height: 14px !important;
|
||||
height: 20px !important;
|
||||
line-height: 20px !important;
|
||||
// margin-top: 5px;
|
||||
clip-path: polygon(
|
||||
/* clip-path: polygon(
|
||||
100% 0,
|
||||
100% 100%,
|
||||
calc(100% - 8px) 60%,
|
||||
8px 60%,
|
||||
0 100%,
|
||||
0 0
|
||||
);
|
||||
);*/
|
||||
// > div {
|
||||
// -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
// }
|
||||
.progress {
|
||||
// width: 50px;
|
||||
background-color: #606060 !important;
|
||||
background-color: #0c96f9 !important;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
@ -1303,7 +1303,7 @@
|
|||
.line {
|
||||
position: absolute;
|
||||
height: 20px;
|
||||
background: #abf7f7;
|
||||
background: #98c3f1;
|
||||
.rightCurDrag {
|
||||
cursor: e-resize;
|
||||
width: 10px;
|
||||
|
|
Loading…
Reference in New Issue