projects/mesxc-lb #283
4
.env.dev
4
.env.dev
@ -1,7 +1,7 @@
|
||||
###
|
||||
# @Author: Do not edit
|
||||
# @Date: 2023-08-29 09:40:39
|
||||
# @LastEditTime: 2024-03-21 14:45:52
|
||||
# @LastEditTime: 2024-03-25 15:59:53
|
||||
# @LastEditors: zhp
|
||||
# @Description:
|
||||
###
|
||||
@ -25,7 +25,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
|
||||
# socket地址
|
||||
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
|
||||
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
|
||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||
|
||||
# 积木报表指向地址
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-11-15 17:19:19
|
||||
* @LastEditTime: 2024-03-21 10:49:24
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@ -118,6 +118,24 @@ export function getCoreWOMaPage(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工单预使用原料分页----根据产品id
|
||||
export function getlistByProductId(query) {
|
||||
return request({
|
||||
url: '/base/material-product-bom-det/listByProductId',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工单预使用原料分页----根据工艺流程
|
||||
export function getlistByFlowId(query) {
|
||||
return request({
|
||||
url: '/extend/process-equ-material-bom-det/listByFlowId',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得预计用料信息分页
|
||||
export function getMaterialBomPage(query) {
|
||||
return request({
|
||||
@ -162,3 +180,12 @@ export function updateConCoreWOr(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改分配产量----批量
|
||||
export function updateBatchConCoreWOr(data) {
|
||||
return request({
|
||||
url: '/base/core-order-con-work-order/updateBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -18,6 +18,15 @@ export function getSchedulingMonitoringRecord(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获得不同产线每小时报废数据,用于班组检测 班组生产情况详情(动态结构)
|
||||
export function getSchedulingMonitoringRecord1(query) {
|
||||
return request({
|
||||
url: '/base/quality-inspection-record/getSchedulingMonitoringRecord24h',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得所有列表
|
||||
export function groupClassesListAll(query) {
|
||||
return request({
|
||||
|
@ -94,7 +94,7 @@
|
||||
:show-file-list="false"
|
||||
icon="el-icon-upload2"
|
||||
:disabled="disabled"
|
||||
:before-upload="beforeUpload"
|
||||
:before-upload="col.uploadTips ? beforeUploadPic : beforeUpload"
|
||||
:on-success="
|
||||
(response, file, fileList) => {
|
||||
handleUploadSuccess(response, file, col.prop);
|
||||
@ -110,7 +110,7 @@
|
||||
上传文件
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
|
||||
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
|
||||
{{ '只能上传jpg/png文件, 大小不超过2MB' }}
|
||||
</div>
|
||||
</el-upload>
|
||||
|
||||
@ -416,6 +416,26 @@ export default {
|
||||
|
||||
// 上传成功的特殊处理
|
||||
beforeUpload(file) {
|
||||
const checkFileSize = () => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.$modal.msgError('上传文件大小不能超过 2MB!');
|
||||
}
|
||||
return isLt2M;
|
||||
};
|
||||
// const checkFileType = () => {
|
||||
// const isJPG =
|
||||
// file.type === 'image/jpeg' ||
|
||||
// file.type === 'image/png' ||
|
||||
// file.type === 'image/jpg';
|
||||
// return isJPG;
|
||||
// };
|
||||
// return checkFileSize() && checkFileType();
|
||||
return checkFileSize();
|
||||
},
|
||||
|
||||
// 上传成功的特殊处理----图片
|
||||
beforeUploadPic(file) {
|
||||
const checkFileSize = () => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
@ -428,6 +448,9 @@ export default {
|
||||
file.type === 'image/jpeg' ||
|
||||
file.type === 'image/png' ||
|
||||
file.type === 'image/jpg';
|
||||
if (!isJPG) {
|
||||
this.$modal.msgError('只能上传jpg/png文件!');
|
||||
}
|
||||
return isJPG;
|
||||
};
|
||||
return checkFileSize() && checkFileType();
|
||||
|
@ -28,136 +28,98 @@ Vue.use(Router);
|
||||
|
||||
// 公共路由
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: (resolve) => require(['@/views/redirect'], resolve),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: (resolve) => require(['@/views/login'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/sso',
|
||||
component: (resolve) => require(['@/views/sso'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/social-login',
|
||||
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: (resolve) => require(['@/views/error/404'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: (resolve) => require(['@/views/error/401'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/print-design',
|
||||
component: (resolve) => require(['@/views/print/design'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('@/views/choicePart'),
|
||||
hidden: true,
|
||||
meta: { requireToken: true },
|
||||
},
|
||||
// {
|
||||
// path: '/',
|
||||
// component: Layout,
|
||||
// // redirect: 'core/base/factory',
|
||||
// // children: [{
|
||||
// // path: 'index',
|
||||
// // redirect: 'core/base/factory',
|
||||
// // component: (resolve) => require(['@/views/index'], resolve),
|
||||
// // name: '首页',
|
||||
// // meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||
// // }
|
||||
// // ]
|
||||
// },
|
||||
{
|
||||
path: '/AGVBoard',
|
||||
name: 'AGVBoard',
|
||||
// component: Layout,
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () =>
|
||||
import(
|
||||
/* webpackChunkName: "about" */ '@/views/OperationalOverview/AGVBoard.vue'
|
||||
),
|
||||
},
|
||||
{
|
||||
path: '/coldBoard',
|
||||
name: 'coldBoard',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () =>
|
||||
import(
|
||||
/* webpackChunkName: "about" */ '@/views/OperationalOverview/coldBoard.vue'
|
||||
),
|
||||
},
|
||||
{
|
||||
path: '/processingBoard',
|
||||
name: 'processingBoard',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () =>
|
||||
import(
|
||||
/* webpackChunkName: "about" */ '@/views/OperationalOverview/processingBoard.vue'
|
||||
),
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [
|
||||
{
|
||||
path: 'profile',
|
||||
component: (resolve) =>
|
||||
require(['@/views/system/user/profile/index'], resolve),
|
||||
name: 'Profile',
|
||||
meta: { title: '个人中心', icon: 'user' },
|
||||
},
|
||||
{
|
||||
path: 'notify-message',
|
||||
component: (resolve) =>
|
||||
require(['@/views/system/notify/my/index'], resolve),
|
||||
name: 'MyNotifyMessage',
|
||||
meta: { title: '我的站内信', icon: 'message' },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/dict',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'type/data/:dictId(\\d+)',
|
||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||
name: 'SystemDictData',
|
||||
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' },
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: (resolve) => require(['@/views/redirect'], resolve)
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: (resolve) => require(['@/views/login'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/sso',
|
||||
component: (resolve) => require(['@/views/sso'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/social-login',
|
||||
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: (resolve) => require(['@/views/error/404'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: (resolve) => require(['@/views/error/401'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/print-design',
|
||||
component: (resolve) => require(['@/views/print/design'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('@/views/choicePart'),
|
||||
hidden: true,
|
||||
meta: { requireToken: true }
|
||||
},
|
||||
{
|
||||
path: '/AGVBoard',
|
||||
name: 'AGVBoard',
|
||||
component: () => import(/* webpackChunkName: "about" */ '@/views/OperationalOverview/AGVBoard.vue')
|
||||
},
|
||||
{
|
||||
path: '/coldBoard',
|
||||
name: 'coldBoard',
|
||||
component: () => import(/* webpackChunkName: "about" */ '@/views/OperationalOverview/coldBoard.vue')
|
||||
},
|
||||
{
|
||||
path: '/processingBoard',
|
||||
name: 'processingBoard',
|
||||
component: () => import(/* webpackChunkName: "about" */ '@/views/OperationalOverview/processingBoard.vue')
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [{
|
||||
path: 'profile',
|
||||
component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
|
||||
name: 'Profile',
|
||||
meta: { title: '个人中心', icon: 'user' }
|
||||
}, {
|
||||
path: 'notify-message',
|
||||
component: (resolve) => require(['@/views/system/notify/my/index'], resolve),
|
||||
name: 'MyNotifyMessage',
|
||||
meta: { title: '我的站内信', icon: 'message' },
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/dict',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'type/data/:dictId(\\d+)',
|
||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||
name: 'SystemDictData',
|
||||
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
// 防止连续点击多次路由报错
|
||||
let routerPush = Router.prototype.push;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-12 09:05:20
|
||||
* @LastEditTime: 2024-03-26 09:57:35
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -36,17 +36,7 @@
|
||||
</el-col>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :beilv="1" :size="'middle'" :title="'周转进度'" :title-icon="'order'" :back="'energy'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
|
||||
<!-- 为外部添加一个容器并显式地设置一个高度: -->
|
||||
<!-- <div style="height: 300px;"> -->
|
||||
<div style="width:100%; overflow: hidden scroll;">
|
||||
<!-- <el-row style="margin-bottom: 1em">
|
||||
<p class="now-team-title">加工工单进度</p>
|
||||
</el-row> -->
|
||||
|
||||
<el-row v-for="op in orderProcessList" :key="op.id" style="margin-bottom: 1em">
|
||||
<p v-if="op.outRate === 1" class="now-secondary-title" style="color:#4679FD">
|
||||
<i class="el-icon-check" />
|
||||
@ -56,31 +46,7 @@
|
||||
<el-progress define-back-color="rgba(32, 57, 96, 1)" text-color="white" :percentage="op.outRate * 100"
|
||||
class="custom-progress-bar" />
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-progress :percentage="100" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title" style="color:#4679FD">
|
||||
<i class="el-icon-check" />
|
||||
成都碲化镉5000一期订单
|
||||
</p>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-progress :percentage="85" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title">成都碲化镉二订单</p>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-progress :percentage="85" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title">长利订单1000</p>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-progress :percentage="85" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title">国际工程20号订单</p>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-progress :percentage="85" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title">铜铟镓硒眉山10万订单</p>
|
||||
</el-row> -->
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</base-container>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -89,50 +55,18 @@
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :beilv="1" :height="256" :size="'middle'" :title="'库存管理'" :title-icon="'productLine'"
|
||||
:back="'energy'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
<!-- <el-row :gutter="9 * beilv"> -->
|
||||
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> -->
|
||||
<base-table :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="inventoryTableProps"
|
||||
:table-data="inventoryList" />
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-table3
|
||||
:page="2"
|
||||
:limit="5"
|
||||
:beilv="1"
|
||||
:table-config="qualityTableProps2"
|
||||
:table-data="qualityList2"
|
||||
/>
|
||||
</el-col> -->
|
||||
<!-- </el-row> -->
|
||||
</base-container>
|
||||
</el-col>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :beilv="1" :height="318 + 338 + 16" :size="'middle'" :title="'库位信息'" :title-icon="'info'"
|
||||
:back="'energy'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
||||
<base-table2 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="locationTableProps"
|
||||
:table-data="locationList" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- end -->
|
||||
<!-- <el-col :span="16">
|
||||
<el-row>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
||||
<base-container :beilv="1" :height="672">
|
||||
<base-video :video-height="624" :beilv="1" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
-->
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
@ -142,252 +76,7 @@ import baseContainer from './components/baseContainer'
|
||||
import baseTable1 from './components/baseTable'
|
||||
import baseTable from './components/baseTable'
|
||||
import baseTable2 from './components/baseTable'
|
||||
// import TopRadioGroup from './components/topRadioGroup'
|
||||
// import pieChart1 from './components/PieChart'
|
||||
// import pieChart2 from './components/PieChart'
|
||||
// import pieChart3 from './components/PieChart'
|
||||
// import { mapGetters } from 'vuex'
|
||||
import screenfull from 'screenfull'
|
||||
// import BaseVideo from './components/baseVideo.vue'
|
||||
// import alarmLevel from './components/alarmLevel'
|
||||
// import axios from '@/utils/request'
|
||||
// import doubleYChart from './components/doubleYChart '
|
||||
// import elementResizeDetectorMaker from 'element-resize-detector';
|
||||
// var erd = elementResizeDetectorMaker(); //创建实例
|
||||
// import LinearBarChart from './components/linearBarChart'
|
||||
const qualityTableProps1 = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: '产线名称'
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '发生时间'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '质量编码'
|
||||
},
|
||||
{
|
||||
prop: 'content',
|
||||
label: '质量内容'
|
||||
}
|
||||
]
|
||||
const qualityTableProps2 = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: '工序名称'
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '发生时间'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '质量编码'
|
||||
},
|
||||
{
|
||||
prop: 'content',
|
||||
label: '质量内容'
|
||||
}
|
||||
]
|
||||
const cxNameList = ['周一', '周二', '周三', '周四', '周五']
|
||||
|
||||
const cxDataList = [
|
||||
{
|
||||
topColor: '#9DD5FF',
|
||||
bottomColor: '#1295FF',
|
||||
name: '电耗能',
|
||||
data: [100, 150, 121, 97, 140]
|
||||
},
|
||||
{
|
||||
topColor: '#FF8BC3',
|
||||
bottomColor: '#EB46A1',
|
||||
name: '水耗能',
|
||||
data: [110, 110, 151, 77, 110]
|
||||
},
|
||||
{
|
||||
topColor: '#85F6E9',
|
||||
bottomColor: '#2EC6B4',
|
||||
name: '天然气',
|
||||
data: [110, 120, 171, 287, 40]
|
||||
},
|
||||
{
|
||||
topColor: '#9496FF',
|
||||
bottomColor: '#6567FF',
|
||||
name: '焦炉煤气',
|
||||
data: [140, 157, 122, 27, 240]
|
||||
},
|
||||
{
|
||||
topColor: '#F68E8A',
|
||||
bottomColor: '#E95552',
|
||||
name: '余热发电',
|
||||
data: [170, 180, 127, 17, 340]
|
||||
},
|
||||
{
|
||||
topColor: '#FFE873',
|
||||
bottomColor: '#E7AE2A',
|
||||
name: '二氧化硫',
|
||||
data: [140, 160, 121, 57, 170]
|
||||
}
|
||||
]
|
||||
|
||||
const qualityList1 = [
|
||||
{ name: '钢一线', createTime: '2021.10.21 24:59:59', code: '2121321231', content: '气泡' },
|
||||
{ name: '钢二线', createTime: '2021.11.22 24:59:59', code: '3321123213', content: '气泡' },
|
||||
{ name: '钢三线', createTime: '2021.12.12 24:59:59', code: '4535435345', content: '气泡' },
|
||||
{ name: '钢四线', createTime: '2021.12.20 24:59:59', code: '5465465466', content: '气泡' },
|
||||
{ name: '钢五线', createTime: '2021.12.02 24:59:59', code: '2132131312', content: '气泡' },
|
||||
{ name: '钢一线', createTime: '2021.10.21 24:59:59', code: '2121321231', content: '气泡' },
|
||||
{ name: '钢二线', createTime: '2021.11.22 24:59:59', code: '3321123213', content: '气泡' },
|
||||
{ name: '钢三线', createTime: '2021.12.12 24:59:59', code: '4535435345', content: '气泡' },
|
||||
{ name: '钢四线', createTime: '2021.12.20 24:59:59', code: '5465465466', content: '气泡' },
|
||||
{ name: '钢五线', createTime: '2021.12.02 24:59:59', code: '2132131312', content: '气泡' },
|
||||
{ name: '钢一线', createTime: '2021.10.21 24:59:59', code: '2121321231', content: '气泡' },
|
||||
{ name: '钢二线', createTime: '2021.11.22 24:59:59', code: '3321123213', content: '气泡' },
|
||||
{ name: '钢三线', createTime: '2021.12.12 24:59:59', code: '4535435345', content: '气泡' },
|
||||
{ name: '钢四线', createTime: '2021.12.20 24:59:59', code: '5465465466', content: '气泡' },
|
||||
{ name: '钢五线', createTime: '2021.12.02 24:59:59', code: '2132131312', content: '气泡' },
|
||||
{ name: '钢六线', createTime: '2021.12.11 24:59:59', code: '2132131212', content: '气泡' }
|
||||
]
|
||||
const qualityList2 = [
|
||||
{ name: '上片', createTime: '2021.10.22 24:59:59', code: '2132132133', content: '气泡' },
|
||||
{ name: '磨边', createTime: '2021.12.21 24:59:59', code: '2132131232', content: '气泡' },
|
||||
{ name: '清洗', createTime: '2021.12.12 24:59:59', code: '1232131312', content: '气泡' },
|
||||
{ name: '激光打孔', createTime: '2021.12.13 24:59:59', code: '2132132131', content: '气泡' },
|
||||
{ name: 'AR镀膜', createTime: '2021.10.23 24:59:59', code: '2311212232', content: '气泡' },
|
||||
{ name: '固化', createTime: '2021.09.22 24:59:59', code: '21321321312', content: '气泡' },
|
||||
{ name: '清洗', createTime: '2021.12.12 24:59:59', code: '1232131312', content: '气泡' },
|
||||
{ name: '激光打孔', createTime: '2021.12.13 24:59:59', code: '2132132131', content: '气泡' },
|
||||
{ name: 'AR镀膜', createTime: '2021.10.23 24:59:59', code: '2311212232', content: '气泡' },
|
||||
{ name: '固化', createTime: '2021.09.22 24:59:59', code: '21321321312', content: '气泡' },
|
||||
{ name: '上片', createTime: '2021.10.22 24:59:59', code: '2132132133', content: '气泡' },
|
||||
{ name: '磨边', createTime: '2021.12.21 24:59:59', code: '2132131232', content: '气泡' },
|
||||
{ name: '清洗', createTime: '2021.12.12 24:59:59', code: '1232131312', content: '气泡' },
|
||||
{ name: '激光打孔', createTime: '2021.12.13 24:59:59', code: '2132132131', content: '气泡' },
|
||||
{ name: 'AR镀膜', createTime: '2021.10.23 24:59:59', code: '2311212232', content: '气泡' },
|
||||
{ name: '固化', createTime: '2021.09.22 24:59:59', code: '21321321312', content: '气泡' },
|
||||
{ name: '丝网印刷', createTime: '2021.12.21 24:59:59', code: '21321322132', content: '气泡' },
|
||||
{ name: '钢化炉', createTime: '2021.12.20 24:59:59', code: '21321312321', content: '气泡' },
|
||||
{ name: '检测设备', createTime: '2021.12.12 24:59:59', code: '21321322132', content: '气泡' },
|
||||
{ name: '包装设备', createTime: '2021.12.23 24:59:59', code: '39284982931', content: '气泡' }
|
||||
]
|
||||
const legendData1 = [
|
||||
{
|
||||
name: '设备1',
|
||||
icon: 'circle',
|
||||
value: 196
|
||||
},
|
||||
{
|
||||
name: '设备2',
|
||||
icon: 'circle',
|
||||
value: 147
|
||||
},
|
||||
{
|
||||
name: '设备3',
|
||||
icon: 'circle',
|
||||
value: 24
|
||||
},
|
||||
{
|
||||
name: '设备4',
|
||||
icon: 'circle',
|
||||
value: 85
|
||||
},
|
||||
{
|
||||
name: '设备5',
|
||||
icon: 'circle',
|
||||
value: 8
|
||||
},
|
||||
{
|
||||
name: '设备6',
|
||||
icon: 'circle',
|
||||
value: 112
|
||||
},
|
||||
{
|
||||
name: '设备7',
|
||||
icon: 'circle',
|
||||
value: 146
|
||||
},
|
||||
{
|
||||
name: '设备8',
|
||||
icon: 'circle',
|
||||
value: 27
|
||||
},
|
||||
{
|
||||
name: '设备9',
|
||||
icon: 'circle',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: '设备10',
|
||||
icon: 'circle',
|
||||
value: 90
|
||||
}
|
||||
]
|
||||
const legendData2 = [
|
||||
{
|
||||
name: '磨边',
|
||||
icon: 'circle',
|
||||
value: 196
|
||||
},
|
||||
{
|
||||
name: '清洗',
|
||||
icon: 'circle',
|
||||
value: 135
|
||||
},
|
||||
{
|
||||
name: '固化',
|
||||
icon: 'circle',
|
||||
value: 144
|
||||
},
|
||||
{
|
||||
name: '镀膜',
|
||||
icon: 'circle',
|
||||
value: 97
|
||||
},
|
||||
{
|
||||
name: '激光打孔',
|
||||
icon: 'circle',
|
||||
value: 12
|
||||
},
|
||||
{
|
||||
name: '丝网印刷',
|
||||
icon: 'circle',
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
name: '钢化炉',
|
||||
icon: 'circle',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
const legendData3 = [
|
||||
{
|
||||
name: '钢一线',
|
||||
icon: 'circle',
|
||||
value: 196
|
||||
},
|
||||
{
|
||||
name: '钢二线',
|
||||
icon: 'circle',
|
||||
value: 133
|
||||
},
|
||||
{
|
||||
name: '钢三线',
|
||||
icon: 'circle',
|
||||
value: 24
|
||||
},
|
||||
{
|
||||
name: '钢四线',
|
||||
icon: 'circle',
|
||||
value: 77
|
||||
},
|
||||
{
|
||||
name: '钢五线',
|
||||
icon: 'circle',
|
||||
value: 77
|
||||
}
|
||||
]
|
||||
const locationTableProps = [
|
||||
{
|
||||
prop: 'eqName',
|
||||
@ -552,107 +241,6 @@ const qualityYearList = [
|
||||
{ eqName: 'RQ20230920', eqCode: '3-03', level: '成品库B-D区-4', product: ' 3.2-1033*2089', productCode: 'CP5651696323', time: '2023年9月20日' },
|
||||
{ eqName: 'RQ20230920', eqCode: '1-03', level: '成品库C-D区-4', product: ' 2.2-1033*2089', productCode: 'CP5651696323', time: '2023年9月20日' }
|
||||
]
|
||||
const qualityMonthTableProps = [
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线名'
|
||||
},
|
||||
{
|
||||
prop: 'process',
|
||||
label: '工序'
|
||||
},
|
||||
{
|
||||
prop: 'eqName',
|
||||
label: '设备名'
|
||||
},
|
||||
{
|
||||
prop: 'eqCode',
|
||||
label: '设备编码'
|
||||
},
|
||||
{
|
||||
prop: 'long',
|
||||
label: '总运行时长(h)'
|
||||
},
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: '保养时间'
|
||||
// },
|
||||
{
|
||||
prop: 'status',
|
||||
label: '设备状态'
|
||||
}
|
||||
// {
|
||||
// prop: 'nextCreateTime',
|
||||
// label: '下次保养时间'
|
||||
// }
|
||||
// {
|
||||
// prop: 'nextLong',
|
||||
// label: '距离保养时间(天)',
|
||||
// // subcomponent: nextDay,
|
||||
// align: 'center'
|
||||
// }
|
||||
]
|
||||
|
||||
const qualityMonthList = [
|
||||
{
|
||||
lineName: '钢一线',
|
||||
process: '41',
|
||||
eqName: '设备1',
|
||||
eqCode: '2312312',
|
||||
long: '255',
|
||||
// createTime: '2021-02-25 12:00:01',
|
||||
status: '报警'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 365
|
||||
},
|
||||
{
|
||||
lineName: '钢二线',
|
||||
process: '41',
|
||||
eqName: '设备2',
|
||||
eqCode: '43434',
|
||||
long: '255',
|
||||
// createTime: '2021-11-25 12:00:01',
|
||||
status: '正常'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 4
|
||||
},
|
||||
{
|
||||
lineName: '钢三线',
|
||||
process: '41',
|
||||
eqName: '设备3',
|
||||
eqCode: '23213212',
|
||||
long: '255',
|
||||
// createTime: '2021-10-25 12:00:01',
|
||||
status: '故障停机'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 24
|
||||
},
|
||||
{
|
||||
lineName: '钢四线',
|
||||
process: '41',
|
||||
eqName: '设备4',
|
||||
eqCode: '23213',
|
||||
long: '255',
|
||||
// createTime: '2021-02-25 12:00:01',
|
||||
status: '故障停机'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: -36
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '设备5',
|
||||
eqCode: '23121312',
|
||||
long: '255',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: '待机'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
}
|
||||
]
|
||||
|
||||
// let resizeFun = null
|
||||
|
||||
export default {
|
||||
name: 'ProductionMonitoringCockpit',
|
||||
components: {
|
||||
@ -676,12 +264,10 @@ export default {
|
||||
times:undefined,
|
||||
value: 100,
|
||||
qualityYearTableProps,
|
||||
cxNameList,
|
||||
inventoryTableProps,
|
||||
inventoryList,
|
||||
locationList,
|
||||
locationTableProps,
|
||||
cxDataList,
|
||||
qualityYearList,
|
||||
isFullScreen: false,
|
||||
orderProcessList: [
|
||||
@ -710,18 +296,12 @@ export default {
|
||||
outRate: '0.4'
|
||||
}
|
||||
],
|
||||
qualityTableProps1,
|
||||
qualityMonthList,
|
||||
qualityMonthTableProps,
|
||||
// qualityTableProps1,
|
||||
modelMonth: '',
|
||||
qualityList1,
|
||||
// logoutTime: 43200000,
|
||||
qualityTableProps2,
|
||||
qualityList2,
|
||||
// qualityTableProps2,
|
||||
// qualityList2,
|
||||
dateType: '0',
|
||||
legendData1,
|
||||
legendData2,
|
||||
legendData3
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -770,23 +350,7 @@ export default {
|
||||
this.beilv2 = _this.clientWidth / 1920
|
||||
})()
|
||||
}
|
||||
// this.beilv2 = window.innerWidth / 1920
|
||||
// addEventListener('resize', resizeFun = () => {
|
||||
// this.beilv2 = window.innerWidth / 1920
|
||||
// })
|
||||
// erd.listenTo(document, (element) => {
|
||||
// console.log(element.offsetWidth)
|
||||
// this.beilv2 = element.offsetWidth / 1920
|
||||
|
||||
// // var width = element.offsetWidth;
|
||||
// // var height = element.offsetHeight;
|
||||
// });
|
||||
},
|
||||
// beforeDestroy() {
|
||||
// //离开页面删除检测器和所有侦听器
|
||||
// // erd.uninstall(document); //这里用ref是因为vue离开页面后获取不到dom
|
||||
// removeEventListener('resize', resizeFun)
|
||||
// },
|
||||
methods: {
|
||||
getTimes() {
|
||||
setInterval(this.getTimesInterval, 1000);
|
||||
@ -815,32 +379,6 @@ export default {
|
||||
windowWidth(value) {
|
||||
this.clientWidth = value
|
||||
},
|
||||
// fetchList(type) {
|
||||
// switch (type) {
|
||||
// case 'order-process':
|
||||
// return axios({
|
||||
// url: '/analysis/factory-monitor/order',
|
||||
// method: 'post'
|
||||
// }).then(res => {
|
||||
// if (res.data) {
|
||||
// console.log(res)
|
||||
// this.orderProcessList = res.data
|
||||
// // this.orderProcessList = [
|
||||
// // { id: 1, name: '订单1', outRate: 0.5 },
|
||||
// // { id: 2, name: '订单2', outRate: 0.54 },
|
||||
// // { id: 3, name: '订单3', outRate: 0.45 },
|
||||
// // { id: 4, name: '订单4', outRate: 0.65 },
|
||||
// // { id: 5, name: '订单5', outRate: 0.35 },
|
||||
// // { id: 6, name: '订单6', outRate: 0.15 },
|
||||
// // { id: 7, name: '订单7', outRate: 0.5 },
|
||||
// // { id: 8, name: '订单8', outRate: 0.5 }
|
||||
// // ]
|
||||
// } else {
|
||||
// this.orderProcessList.splice(0)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
change() {
|
||||
this.isFullScreen = screenfull.isFullscreen
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-29 16:50:26
|
||||
* @LastEditTime: 2024-03-13 09:07:37
|
||||
* @LastEditTime: 2024-03-26 18:00:34
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -134,143 +134,32 @@
|
||||
<script>
|
||||
import baseContainer from './components/baseContainer'
|
||||
import baseTable1 from './components/baseTable'
|
||||
// import baseContainer1 from './components/baseContainer/indexcopy'
|
||||
// import baseTable2 from './components/baseTable'
|
||||
// import baseTable3 from './components/baseTable'
|
||||
import TopRadioGroup from './components/topRadioGroup'
|
||||
import screenfull from 'screenfull'
|
||||
// import BaseVideo from './components/baseVideo.vue'
|
||||
import alarmLevel from './components/alarmLevel'
|
||||
import pileBarChart from './components/pileBarChart'
|
||||
import colorDiv from './components/colorDiv'
|
||||
import moment from "moment";
|
||||
|
||||
// import axios from '@/utils/request'
|
||||
import doubleYChart from './components/coldDoubleYChart'
|
||||
import { parseTime } from '../core/mixins/code-filter';
|
||||
import ISRAChart from './components/ISRAChart.vue';
|
||||
import { getDcsMsg, closeDcsMsg } from "./wsInterface"
|
||||
import LinearBarChart from './components/linearBarChart'
|
||||
const qualityYearTableProps= []
|
||||
const EqMonitoringPropsFun = [
|
||||
{ prop: 'equipmentName', label: '设备名称' },
|
||||
{ prop: 'status', label: '运行状态', width: 80}
|
||||
]
|
||||
const EqMonitoringProps = [
|
||||
{ prop: 'line', label: '产线' },
|
||||
{ prop: 'name', label: '设备名称' },
|
||||
{ prop: 'code', label: '设备编码' },
|
||||
{
|
||||
prop: 'run',
|
||||
label: '运行状态',
|
||||
},
|
||||
{
|
||||
prop: 'error',
|
||||
label: '故障状态',
|
||||
},
|
||||
]
|
||||
const cutProps = [
|
||||
{ prop: 'lineName', label: '产线', width: 50 },
|
||||
{
|
||||
prop: 'time', label: '时间',
|
||||
filter: parseTime
|
||||
},
|
||||
{ prop: 'size', label: '规格' },
|
||||
{ prop: 'productArea', label: '良品面积', width: 80 },
|
||||
{ prop: 'wasteArea', label: '废片面积', width: 80 },
|
||||
{
|
||||
prop: 'product', label: '良品率', width: 80,
|
||||
subcomponent: colorDiv,
|
||||
},
|
||||
]
|
||||
const cxNameList = ['周一', '周二', '周三', '周四', '周五']
|
||||
|
||||
const cxDataList = [
|
||||
{
|
||||
topColor: '#9DD5FF',
|
||||
bottomColor: '#1295FF',
|
||||
name: '电耗能',
|
||||
data: [100, 150, 121, 97, 140]
|
||||
},
|
||||
{
|
||||
topColor: '#FF8BC3',
|
||||
bottomColor: '#EB46A1',
|
||||
name: '水耗能',
|
||||
data: [110, 110, 151, 77, 110]
|
||||
},
|
||||
{
|
||||
topColor: '#85F6E9',
|
||||
bottomColor: '#2EC6B4',
|
||||
name: '天然气',
|
||||
data: [110, 120, 171, 287, 40]
|
||||
},
|
||||
{
|
||||
topColor: '#9496FF',
|
||||
bottomColor: '#6567FF',
|
||||
name: '焦炉煤气',
|
||||
data: [140, 157, 122, 27, 240]
|
||||
},
|
||||
{
|
||||
topColor: '#F68E8A',
|
||||
bottomColor: '#E95552',
|
||||
name: '余热发电',
|
||||
data: [170, 180, 127, 17, 340]
|
||||
},
|
||||
{
|
||||
topColor: '#FFE873',
|
||||
bottomColor: '#E7AE2A',
|
||||
name: '二氧化硫',
|
||||
data: [140, 160, 121, 57, 170]
|
||||
}
|
||||
]
|
||||
const ISRATableProps = [
|
||||
{
|
||||
prop: 'linename',
|
||||
label:'产线'
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
label: '时间'
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
label:'缺陷类型'
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: '缺陷数量'
|
||||
},
|
||||
{
|
||||
prop: 'percent',
|
||||
label: '占比'
|
||||
}
|
||||
]
|
||||
import WebSocketHeartbeat from './ws.js';
|
||||
export default {
|
||||
name: 'ProductionMonitoringCockpit',
|
||||
components: {
|
||||
baseContainer,
|
||||
baseTable1,
|
||||
pileBarChart,
|
||||
TopRadioGroup,
|
||||
doubleYChart,
|
||||
LinearBarChart,
|
||||
ISRAChart
|
||||
// baseContainer1
|
||||
// pieChart1,
|
||||
// pieChart2
|
||||
// pieChart3
|
||||
// BaseVideo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
beilv2: 1,
|
||||
beilv: 1,
|
||||
value: 100,
|
||||
EqMonitoringProps,
|
||||
EqMonitoringPropsFun,
|
||||
realEqList:[],
|
||||
qualityYearTableProps,
|
||||
ISRATableProps,
|
||||
orderList: [],
|
||||
times: '',
|
||||
cutConfig: {
|
||||
@ -330,21 +219,18 @@ export default {
|
||||
},
|
||||
ISRAList:[],
|
||||
EnergyMonitoringNameList: [],
|
||||
equipmentList: [],
|
||||
EnergyMonitoringList: [],
|
||||
// offsetWidth: null,
|
||||
cxNameList,
|
||||
cxDataList,
|
||||
// time:12,
|
||||
cutProps,
|
||||
// logoutTime: 43200000,
|
||||
cutTableDataList:[],
|
||||
clientWidth: 0,
|
||||
containerWidth: 111111,
|
||||
isFullScreen: false,
|
||||
cutWsData: {},
|
||||
Cutws: undefined,
|
||||
funWs: undefined,
|
||||
SJGws: undefined,
|
||||
funWsData: {},
|
||||
SJGWsData: {},
|
||||
cxNameList:[],
|
||||
cxDataList:[],
|
||||
// orderProcessList: [],
|
||||
dateType: '0',
|
||||
wsIsOpen:false,
|
||||
@ -385,19 +271,15 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.fetchList('exception-alarm')
|
||||
// this.fetchList('inAndOutOfEachLine')
|
||||
// this.fetchList('order-process')
|
||||
// this.fetchList('line-chart-data')
|
||||
this.init()
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 86400000)
|
||||
},
|
||||
destroyed() {
|
||||
this.funInitWebSocket()
|
||||
this.CutInitWebSocket()
|
||||
this.CutWebsocketClose()
|
||||
this.SJGWebsocketClose()
|
||||
this.funWebSocketClose()
|
||||
if (this.wsIsOpen) {
|
||||
closeDcsMsg()
|
||||
this.wsIsOpen = false
|
||||
@ -428,59 +310,20 @@ export default {
|
||||
this.beilv2 = _this.clientWidth / 1920
|
||||
})()
|
||||
}
|
||||
// logoutInterval = setInterval(() => {
|
||||
// this.logoutTime -= 1000
|
||||
// }, 1000)
|
||||
// if (this.logoutTime === 0) {
|
||||
// this.SJGInitWebSocket()
|
||||
// this.CutInitWebSocket()
|
||||
// this.funInitWebSocket()
|
||||
// this.logoutTimeReset()
|
||||
// }
|
||||
},
|
||||
// beforeDestroy() {
|
||||
// //离开页面删除检测器和所有侦听器
|
||||
// // erd.uninstall(document); //这里用ref是因为vue离开页面后获取不到dom
|
||||
// removeEventListener('resize', resizeFun)
|
||||
// },
|
||||
methods: {
|
||||
// logoutTimeReset() {
|
||||
// this.logoutTime = this.time * 60 * 60 * 1000
|
||||
// },
|
||||
CutWebsocketClose(e) {
|
||||
console.log('WebSocket 断开连接', e)
|
||||
this.Cutws.ws.onclose = (event) => { console.log(event );}
|
||||
},
|
||||
SJGWebsocketClose(e) {
|
||||
console.log('WebSocket 断开连接', e)
|
||||
this.SJGws.ws.onclose = (event) => { console.log(event); }
|
||||
},
|
||||
funWebSocketClose(e) {
|
||||
console.log('WebSocket 断开连接', e)
|
||||
this.funWs.ws.onclose = (event) => { console.log(event); }
|
||||
},
|
||||
formatTime(time, option) {
|
||||
// if (('' + time).length === 10) {
|
||||
// time = parseInt(time) * 1000
|
||||
// } else {
|
||||
// time = +time
|
||||
// }
|
||||
console.log(time);
|
||||
const d = new Date(time)
|
||||
// const now = Date.now()
|
||||
// console.log(time);
|
||||
// const diff = (now - d) / 1000
|
||||
|
||||
// if (diff < 30) {
|
||||
// return '刚刚'
|
||||
// } else if (diff < 3600) {
|
||||
// // less 1 hour
|
||||
// return Math.ceil(diff / 60) + '分钟前'
|
||||
// } else if (diff < 3600 * 24) {
|
||||
// return Math.ceil(diff / 3600) + '小时前'
|
||||
// } else if (diff < 3600 * 24 * 2) {
|
||||
// return '1天前'
|
||||
// }
|
||||
// if (option) {
|
||||
// return parseTime(time, option)
|
||||
// } else {
|
||||
return (
|
||||
d.getMonth() +
|
||||
1 +
|
||||
@ -495,30 +338,6 @@ export default {
|
||||
)
|
||||
// }
|
||||
},
|
||||
// getList() {
|
||||
// // this.loading = true;
|
||||
// // 执行查询
|
||||
// // let data = '{ "data": { "FanFrequencyInfo": { "1#10处拐角冷却风机": "0", "1#L型吊墙冷却风机": "0", "1#助燃风机": "44.8", "1#澄清带池壁风机": "40", "1#融化带池壁风机": "43", "1#钢碹碴小炉垛风机": "48", "2#10处拐角冷却风机": "50", "2#L型吊墙冷却风机": "49.7", "2#助燃风机": "0", "2#澄清带池壁风机": "0", "2#融化带池壁风机": "0", "2#钢碹碴小炉垛风机": "48", "3#澄清带池壁风机": "0", "3#融化带池壁风机": "0", "4#澄清带池壁风机": "40", "4#融化带池壁风机": "43" } }, "type": "FanFrequencyInfo" }'
|
||||
// // let obj = JSON.parse(data)
|
||||
// // // for()
|
||||
// // let arr = []
|
||||
// // for (let i in obj.data.FanFrequencyInfo) {
|
||||
// // arr.push({
|
||||
// // equipmentName: i,
|
||||
// // status: obj.data.FanFrequencyInfo[i]
|
||||
// // })
|
||||
// // }
|
||||
// // this.funList = arr``
|
||||
// this.$axios.get(
|
||||
// '/monitoring/equipment-monitor/realtime-page',
|
||||
// 'get',
|
||||
// this.queryParams
|
||||
// ).then((res) => {
|
||||
// this.realEqList = res.data.list;
|
||||
// // this.total = response.data.total;
|
||||
// // this.loading = false;
|
||||
// });
|
||||
// },
|
||||
getTimes() {
|
||||
setInterval(this.getTimesInterval, 1000);
|
||||
},
|
||||
@ -544,133 +363,229 @@ export default {
|
||||
this.times = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
||||
},
|
||||
SJGInitWebSocket() {
|
||||
if (typeof (WebSocket) === 'undefined') {
|
||||
alert('您的浏览器不支持WebSocket')
|
||||
} else {
|
||||
// const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
|
||||
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
let date = new Date().valueOf()
|
||||
const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=COLD${date}`
|
||||
this.SJGWebsocket = new WebSocket(SJGWsUrl)
|
||||
// 监听 WebSocket 连接
|
||||
this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen
|
||||
// 监听 WebSocket 错误信息
|
||||
this.SJGWebsocket.onerror = this.SJGWebsocketOnError
|
||||
// 监听 WebSocket 消息
|
||||
this.SJGWebsocket.onmessage = this.SJGWebsocketOnMessage
|
||||
// 监听 webSocket 断开信息
|
||||
this.SJGWebsocket.onclose = this.SJGWebsocketClose
|
||||
}
|
||||
let date = new Date().valueOf()
|
||||
const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=COLD${date}`
|
||||
this.SJGws = new WebSocketHeartbeat(SJGWsUrl);
|
||||
|
||||
// 处理收到的消息
|
||||
this.SJGws.ws.onmessage = (event) => {
|
||||
this.SJGWsData = event?.data ? JSON.parse(event?.data) : {}
|
||||
if (this.SJGWsData.type === 'isra') {
|
||||
console.log('222222', this.SJGWsData.detData)
|
||||
console.log(this.SJGWsData.detData);
|
||||
let chartData = this.SJGWsData.detData.map((item, index) => {
|
||||
return {
|
||||
name: item.type,
|
||||
num: item.num
|
||||
}
|
||||
})
|
||||
this.$refs['ISRAChart'].updateChart(chartData)
|
||||
} else if (this.SJGWsData.type === 'equipment') {
|
||||
this.realEqList = this.SJGWsData.detData.map((item, index) => [
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.name || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.run || ''}</span>`,
|
||||
])
|
||||
}
|
||||
this.realEqConfig.data = this.realEqList
|
||||
this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
|
||||
};
|
||||
// if (typeof (WebSocket) === 'undefined') {
|
||||
// alert('您的浏览器不支持WebSocket')
|
||||
// } else {
|
||||
// // const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
|
||||
// // const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
// let date = new Date().valueOf()
|
||||
// const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=COLD${date}`
|
||||
// this.SJGWebsocket = new WebSocket(SJGWsUrl)
|
||||
// // 监听 WebSocket 连接
|
||||
// this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen
|
||||
// // 监听 WebSocket 错误信息
|
||||
// this.SJGWebsocket.onerror = this.SJGWebsocketOnError
|
||||
// // 监听 WebSocket 消息
|
||||
// this.SJGWebsocket.onmessage = this.SJGWebsocketOnMessage
|
||||
// // 监听 webSocket 断开信息
|
||||
// this.SJGWebsocket.onclose = this.SJGWebsocketClose
|
||||
// }
|
||||
},
|
||||
CutInitWebSocket() {
|
||||
if (typeof (WebSocket) === 'undefined') {
|
||||
alert('您的浏览器不支持WebSocket')
|
||||
} else {
|
||||
// const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
|
||||
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
let date = new Date().valueOf()
|
||||
let date = new Date().valueOf()
|
||||
const cutWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=CUTTING${date}`
|
||||
// const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=COLD${date}`
|
||||
this.Cutws = new WebSocketHeartbeat(cutWsUrl);
|
||||
|
||||
this.cutWebsocket = new WebSocket(cutWsUrl)
|
||||
// 监听 WebSocket 连接
|
||||
this.cutWebsocket.onopen = this.cutWebsocketOnOpen
|
||||
// 监听 WebSocket 错误信息
|
||||
this.cutWebsocket.onerror = this.cutWebsocketOnError
|
||||
// 监听 WebSocket 消息
|
||||
this.cutWebsocket.onmessage = this.cutWebsocketOnMessage
|
||||
// 监听 webSocket 断开信息
|
||||
this.cutWebsocket.onclose = this.cutWebsocketClose
|
||||
}
|
||||
// 处理收到的消息
|
||||
this.Cutws.ws.onmessage = (event) => {
|
||||
console.log(event)
|
||||
this.cutWsData = event?.data ? JSON.parse(event?.data) : {}
|
||||
if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') {
|
||||
let cutArr = this.cutWsData.productHourData.map((item, index) => [
|
||||
`<span style="color:rgba(255,255,255,0.7)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.7)" >${item.lineName || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.7)">${this.formatTime(item.time) || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.7)">${this.getSize(item.size) || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.7)">${item.productArea + '㎡' || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.7)">${item.wasteArea + '㎡' || ''}</span>`,
|
||||
`<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
|
||||
<div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
|
||||
])
|
||||
this.cutConfig.data = cutArr
|
||||
this.$refs['cutScrollBoard'].updateRows(cutArr)
|
||||
} else if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'chart' && this.cutWsData.dateType === 'day') {
|
||||
let nameList = []
|
||||
let nameWasteList = []
|
||||
let topNameList = []
|
||||
let productList = []
|
||||
let wasteList = []
|
||||
let sumAreaList = []
|
||||
let yieldList = []
|
||||
// this.cutTableDataList =
|
||||
this.cutWsData.coldDetData.forEach((ele, index) => {
|
||||
nameList.push(ele.lineName)
|
||||
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea)
|
||||
productList.push(ele.productArea)
|
||||
wasteList.push(ele.wastArea)
|
||||
nameWasteList.push('缺陷面积:' + ele.wastArea)
|
||||
sumAreaList.push(ele.sumArea)
|
||||
yieldList.push((ele.yield * 100).toFixed(3))
|
||||
})
|
||||
this.$refs.pileChart.initChart(nameList, topNameList, nameWasteList, productList, wasteList)
|
||||
this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
|
||||
}
|
||||
};
|
||||
// if (typeof (WebSocket) === 'undefined') {
|
||||
// alert('您的浏览器不支持WebSocket')
|
||||
// } else {
|
||||
// // const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
|
||||
// // const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
// let date = new Date().valueOf()
|
||||
// const cutWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=CUTTING${date}`
|
||||
|
||||
// this.cutWebsocket = new WebSocket(cutWsUrl)
|
||||
// // 监听 WebSocket 连接
|
||||
// this.cutWebsocket.onopen = this.cutWebsocketOnOpen
|
||||
// // 监听 WebSocket 错误信息
|
||||
// this.cutWebsocket.onerror = this.cutWebsocketOnError
|
||||
// // 监听 WebSocket 消息
|
||||
// this.cutWebsocket.onmessage = this.cutWebsocketOnMessage
|
||||
// // 监听 webSocket 断开信息
|
||||
// this.cutWebsocket.onclose = this.cutWebsocketClose
|
||||
// }
|
||||
},
|
||||
funInitWebSocket() {
|
||||
if (typeof (WebSocket) === 'undefined') {
|
||||
alert('您的浏览器不支持WebSocket')
|
||||
} else {
|
||||
// const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
|
||||
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
let date = new Date().valueOf()
|
||||
const funWsUrl = `ws://10.70.180.10:8081/xc-screen/websocket/${date}`
|
||||
this.funWebsocket = new WebSocket(funWsUrl)
|
||||
// 监听 WebSocket 连接
|
||||
this.funWebsocket.onopen = this.funWebsocketOnOpen
|
||||
// 监听 WebSocket 错误信息
|
||||
this.funWebsocket.onerror = this.funWebsocketOnError
|
||||
// 监听 WebSocket 消息
|
||||
this.funWebsocket.onmessage = this.funWebsocketOnMessage
|
||||
// 监听 webSocket 断开信息
|
||||
this.funWebsocket.onclose = this.funWebsocketClose
|
||||
}
|
||||
},
|
||||
funWebsocketOnOpen() {
|
||||
console.log('socket连接成功')
|
||||
this.SJGWebsocket.onmessage()
|
||||
},
|
||||
// 连接建立失败重连
|
||||
funWebsocketOnError(e) {
|
||||
this.funInitWebSocket()
|
||||
},
|
||||
// 数据接收
|
||||
funWebsocketOnMessage(e) {
|
||||
this.funWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// FanInfo
|
||||
if (this.funWsData.type === 'AnnealFanInfo') {
|
||||
let arr = []
|
||||
let index = 0
|
||||
for (let i in this.funWsData.data.annealFanInfo) {
|
||||
index++,
|
||||
// let index = 1,
|
||||
// index++
|
||||
// arr.push({
|
||||
// equipmentName: i,
|
||||
// status: this.funWsData.data.annealFanInfo[i]
|
||||
// })
|
||||
arr.push([
|
||||
// console.log(item)
|
||||
`
|
||||
let date = new Date().valueOf()
|
||||
const funWsUrl = `ws://10.70.180.10:8081/xc-screen/websocket/${date}`
|
||||
this.funWs = new WebSocketHeartbeat(funWsUrl);
|
||||
// 处理收到的消息
|
||||
this.funWs.ws.onmessage = (event) => {
|
||||
this.funWsData = event?.data ? JSON.parse(event?.data) : {}
|
||||
// FanInfo
|
||||
if (this.funWsData.type === 'AnnealFanInfo') {
|
||||
let arr = []
|
||||
let index = 0
|
||||
for (let i in this.funWsData.data.annealFanInfo) {
|
||||
index++,
|
||||
arr.push([
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${index || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${i || ''}
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${i || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${this.funWsData.data.annealFanInfo[i] || ''}</span>`,
|
||||
])
|
||||
`<span style="color:rgba(255,255,255,0.5)">${this.funWsData.data.annealFanInfo[i] || ''}</span>`,
|
||||
])
|
||||
}
|
||||
this.annealFunConfig.data = arr
|
||||
this.$refs['annealFunScrollBoard'].updateRows(arr)
|
||||
}
|
||||
this.annealFunConfig.data = arr
|
||||
this.$refs['annealFunScrollBoard'].updateRows(arr)
|
||||
}
|
||||
if (this.funWsData.type === 'FanInfo') {
|
||||
let arr = []
|
||||
let index = 0
|
||||
for (let i in this.funWsData.data.fanInfo) {
|
||||
index++,
|
||||
// arr.push({
|
||||
// equipmentName: i,
|
||||
// status: this.funWsData.data.fanInfo[i]
|
||||
// })
|
||||
arr.push([
|
||||
// console.log(item)
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${index || ''}</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${i || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${this.funWsData.data.fanInfo[i] || ''}</span>`,
|
||||
])
|
||||
if (this.funWsData.type === 'FanInfo') {
|
||||
let arr = []
|
||||
let index = 0
|
||||
for (let i in this.funWsData.data.fanInfo) {
|
||||
index++,
|
||||
arr.push([
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${i || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${this.funWsData.data.fanInfo[i] || ''}</span>`,
|
||||
])
|
||||
}
|
||||
this.funConfig.data = arr
|
||||
this.$refs['funScrollBoard'].updateRows(arr)
|
||||
}
|
||||
this.funConfig.data = arr
|
||||
this.$refs['funScrollBoard'].updateRows(arr)
|
||||
// this.funList = arr
|
||||
}
|
||||
},
|
||||
cutWebsocketOnOpen() {
|
||||
console.log('socket连接成功')
|
||||
this.SJGWebsocket.onmessage()
|
||||
},
|
||||
// 连接建立失败重连
|
||||
cutWebsocketOnError(e) {
|
||||
this.CutInitWebSocket()
|
||||
};
|
||||
// if (typeof (WebSocket) === 'undefined') {
|
||||
// alert('您的浏览器不支持WebSocket')
|
||||
// } else {
|
||||
// // const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
|
||||
// // const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
// let date = new Date().valueOf()
|
||||
// const funWsUrl = `ws://10.70.180.10:8081/xc-screen/websocket/${date}`
|
||||
// this.funWebsocket = new WebSocket(funWsUrl)
|
||||
// // 监听 WebSocket 连接
|
||||
// this.funWebsocket.onopen = this.funWebsocketOnOpen
|
||||
// // 监听 WebSocket 错误信息
|
||||
// this.funWebsocket.onerror = this.funWebsocketOnError
|
||||
// // 监听 WebSocket 消息
|
||||
// this.funWebsocket.onmessage = this.funWebsocketOnMessage
|
||||
// // 监听 webSocket 断开信息
|
||||
// this.funWebsocket.onclose = this.funWebsocketClose
|
||||
// }
|
||||
},
|
||||
// funWebsocketOnOpen() {
|
||||
// console.log('socket连接成功')
|
||||
// this.SJGWebsocket.onmessage()
|
||||
// },
|
||||
// // 连接建立失败重连
|
||||
// funWebsocketOnError(e) {
|
||||
// this.funInitWebSocket()
|
||||
// },
|
||||
// 数据接收
|
||||
// funWebsocketOnMessage(e) {
|
||||
// this.funWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// // FanInfo
|
||||
// if (this.funWsData.type === 'AnnealFanInfo') {
|
||||
// let arr = []
|
||||
// let index = 0
|
||||
// for (let i in this.funWsData.data.annealFanInfo) {
|
||||
// index++,
|
||||
// arr.push([
|
||||
// `
|
||||
// <span style="color:rgba(255,255,255,0.5)" >${index || ''}
|
||||
// </span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)" >${i || ''}
|
||||
// </span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${this.funWsData.data.annealFanInfo[i] || ''}</span>`,
|
||||
// ])
|
||||
// }
|
||||
// this.annealFunConfig.data = arr
|
||||
// this.$refs['annealFunScrollBoard'].updateRows(arr)
|
||||
// }
|
||||
// if (this.funWsData.type === 'FanInfo') {
|
||||
// let arr = []
|
||||
// let index = 0
|
||||
// for (let i in this.funWsData.data.fanInfo) {
|
||||
// index++,
|
||||
// arr.push([
|
||||
// `<span style="color:rgba(255,255,255,0.5)" >${index || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)" >${i || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${this.funWsData.data.fanInfo[i] || ''}</span>`,
|
||||
// ])
|
||||
// }
|
||||
// this.funConfig.data = arr
|
||||
// this.$refs['funScrollBoard'].updateRows(arr)
|
||||
// }
|
||||
// },
|
||||
// cutWebsocketOnOpen() {
|
||||
// console.log('socket连接成功')
|
||||
// this.SJGWebsocket.onmessage()
|
||||
// },
|
||||
// // 连接建立失败重连
|
||||
// cutWebsocketOnError(e) {
|
||||
// this.CutInitWebSocket()
|
||||
// },
|
||||
getSize(str) {
|
||||
// console.log(str.match(/\d+(\.\d+)?/g))
|
||||
let size = str.match(/\d+(\.\d+)?/g).map(ele => {
|
||||
@ -680,157 +595,82 @@ export default {
|
||||
return size[0] + '*' + size[1] + '*' + size[2]
|
||||
},
|
||||
// 数据接收
|
||||
cutWebsocketOnMessage(e) {
|
||||
this.cutWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') {
|
||||
// this.cutTableDataList = this.cutWsData.productHourData.map((ele, index) => {
|
||||
// // if (ele.progressRate != 1) {
|
||||
// return {
|
||||
// id: ele.id,
|
||||
// lineName: ele.lineName,
|
||||
// time: ele.time,
|
||||
// size: this.getSize(ele.size),
|
||||
// productArea: ele.productArea + '㎡',
|
||||
// wasteArea: ele.wasteArea + '㎡',
|
||||
// product: (ele.product * 100).toFixed(2)
|
||||
// }
|
||||
// // }
|
||||
// });
|
||||
let cutArr = this.cutWsData.productHourData.map((item, index) => [
|
||||
// console.log(item)
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.7)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.7)" >${item.lineName || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.7)">${this.formatTime(item.time) || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.7)">${this.getSize(item.size) || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.7)">${item.productArea + '㎡' || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.7)">${item.wasteArea + '㎡' || ''}</span>`,
|
||||
`<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
|
||||
<div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
|
||||
])
|
||||
this.cutConfig.data = cutArr
|
||||
this.$refs['cutScrollBoard'].updateRows(cutArr)
|
||||
} else if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'chart' && this.cutWsData.dateType === 'day') {
|
||||
let nameList = []
|
||||
let nameWasteList = []
|
||||
let topNameList = []
|
||||
let productList = []
|
||||
let wasteList = []
|
||||
let sumAreaList = []
|
||||
let yieldList = []
|
||||
// this.cutTableDataList =
|
||||
this.cutWsData.coldDetData.forEach((ele, index) => {
|
||||
nameList.push(ele.lineName)
|
||||
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea)
|
||||
productList.push(ele.productArea)
|
||||
wasteList.push(ele.wastArea)
|
||||
nameWasteList.push('缺陷面积:' + ele.wastArea)
|
||||
sumAreaList.push(ele.sumArea)
|
||||
yieldList.push((ele.yield *100).toFixed(3))
|
||||
})
|
||||
this.$refs.pileChart.initChart(nameList, topNameList, nameWasteList, productList, wasteList)
|
||||
this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
|
||||
}
|
||||
},
|
||||
SJGWebsocketOnOpen() {
|
||||
console.log('socket连接成功')
|
||||
this.SJGWebsocket.onmessage()
|
||||
},
|
||||
// cutWebsocketOnMessage(e) {
|
||||
// this.cutWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') {
|
||||
// let cutArr = this.cutWsData.productHourData.map((item, index) => [
|
||||
// `<span style="color:rgba(255,255,255,0.7)" >${index + 1 || ''}
|
||||
// </span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.7)" >${item.lineName || ''}
|
||||
// </span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.7)">${this.formatTime(item.time) || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.7)">${this.getSize(item.size) || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.7)">${item.productArea + '㎡' || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.7)">${item.wasteArea + '㎡' || ''}</span>`,
|
||||
// `<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
|
||||
// <div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
|
||||
// ])
|
||||
// this.cutConfig.data = cutArr
|
||||
// this.$refs['cutScrollBoard'].updateRows(cutArr)
|
||||
// } else if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'chart' && this.cutWsData.dateType === 'day') {
|
||||
// let nameList = []
|
||||
// let nameWasteList = []
|
||||
// let topNameList = []
|
||||
// let productList = []
|
||||
// let wasteList = []
|
||||
// let sumAreaList = []
|
||||
// let yieldList = []
|
||||
// // this.cutTableDataList =
|
||||
// this.cutWsData.coldDetData.forEach((ele, index) => {
|
||||
// nameList.push(ele.lineName)
|
||||
// topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea)
|
||||
// productList.push(ele.productArea)
|
||||
// wasteList.push(ele.wastArea)
|
||||
// nameWasteList.push('缺陷面积:' + ele.wastArea)
|
||||
// sumAreaList.push(ele.sumArea)
|
||||
// yieldList.push((ele.yield *100).toFixed(3))
|
||||
// })
|
||||
// this.$refs.pileChart.initChart(nameList, topNameList, nameWasteList, productList, wasteList)
|
||||
// this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
|
||||
// }
|
||||
// },
|
||||
// SJGWebsocketOnOpen() {
|
||||
// console.log('socket连接成功')
|
||||
// this.SJGWebsocket.onmessage()
|
||||
// },
|
||||
// 连接建立失败重连
|
||||
SJGWebsocketOnError(e) {
|
||||
this.SJGInitWebSocket()
|
||||
},
|
||||
// SJGWebsocketOnError(e) {
|
||||
// this.SJGInitWebSocket()
|
||||
// },
|
||||
// 数据接收
|
||||
SJGWebsocketOnMessage(e) {
|
||||
// let data = { "data": { "FanFrequencyInfo": { "1#10处拐角冷却风机": "0", "1#L型吊墙冷却风机": "0", "1#助燃风机": "44.8", "1#澄清带池壁风机": "40", "1#融化带池壁风机": "43", "1#钢碹碴小炉垛风机": "48", "2#10处拐角冷却风机": "50", "2#L型吊墙冷却风机": "49.7", "2#助燃风机": "0", "2#澄清带池壁风机": "0", "2#融化带池壁风机": "0", "2#钢碹碴小炉垛风机": "48", "3#澄清带池壁风机": "0", "3#融化带池壁风机": "0", "4#澄清带池壁风机": "40", "4#融化带池壁风机": "43" } }, "type": "FanFrequencyInfo" }
|
||||
// let obj = JSON.parse(data.data)
|
||||
this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
if (this.SJGWsData.type === 'isra') {
|
||||
console.log('222222', this.SJGWsData.detData);
|
||||
// this.ISRAList = this.SJGWsData.detData.map((ele, index) => {
|
||||
// // if (ele.progressRate != 1) {
|
||||
// return {
|
||||
// id: ele.id,
|
||||
// linename: ele.linename,
|
||||
// type: ele.type,
|
||||
// num: ele.num,
|
||||
// time:ele.time,
|
||||
// percent: ele.percent
|
||||
// }
|
||||
// // }
|
||||
// });
|
||||
console.log(this.SJGWsData.detData);
|
||||
let chartData = this.SJGWsData.detData.map((item, index) => {
|
||||
return {
|
||||
name: item.type,
|
||||
num:item.num
|
||||
}
|
||||
})
|
||||
// let ISRAArr = this.SJGWsData.detData.map((item, index) => [
|
||||
// // console.log(item)
|
||||
// `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
// </span>`,
|
||||
// // formatDate(item.planStartTime) || '',
|
||||
// `
|
||||
// <span style="color:rgba(255,255,255,0.5)" >${item.linename || ''}
|
||||
// </span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.time || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.type || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.num || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${(item.percent * 100).toFixed(2) || ''}</span>`,
|
||||
// ])
|
||||
// this.ISRAConfig.data = ISRAArr
|
||||
this.$refs['ISRAChart'].updateChart(chartData)
|
||||
} else if (this.SJGWsData.type === 'equipment') {
|
||||
this.realEqList = this.SJGWsData.detData.map((ele, index) =>[
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
// `<span style="color:rgba(255,255,255,0.5)" >${item.line || ''}
|
||||
// </span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.name || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.run || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||
]);
|
||||
}
|
||||
this.realEqConfig.data = this.realEqList
|
||||
this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
|
||||
},
|
||||
// SJGWebsocketOnMessage(e) {
|
||||
// this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// if (this.SJGWsData.type === 'isra') {
|
||||
// console.log('222222', this.SJGWsData.detData)
|
||||
// console.log(this.SJGWsData.detData);
|
||||
// let chartData = this.SJGWsData.detData.map((item, index) => {
|
||||
// return {
|
||||
// name: item.type,
|
||||
// num:item.num
|
||||
// }
|
||||
// })
|
||||
// this.$refs['ISRAChart'].updateChart(chartData)
|
||||
// } else if (this.SJGWsData.type === 'equipment') {
|
||||
// this.realEqList = this.SJGWsData.detData.map((ele, index) =>[
|
||||
// // console.log(item)
|
||||
// `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
// </span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${ele.name || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${ele.run || ''}</span>`,
|
||||
// ])
|
||||
// }
|
||||
// this.realEqConfig.data = this.realEqList
|
||||
// this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
|
||||
// },
|
||||
windowWidth(value) {
|
||||
this.clientWidth = value
|
||||
this.beilv2 = this.clientWidth / 1920
|
||||
},
|
||||
// fetchList(type) {
|
||||
// switch (type) {
|
||||
// case 'order-process':
|
||||
// return axios({
|
||||
// url: '/analysis/factory-monitor/order',
|
||||
// method: 'post'
|
||||
// }).then(res => {
|
||||
// if (res.data) {
|
||||
// this.orderProcessList = res.data
|
||||
// // this.orderProcessList = [
|
||||
// // { id: 1, name: '订单1', outRate: 0.5 },
|
||||
// // { id: 2, name: '订单2', outRate: 0.54 },
|
||||
// // { id: 3, name: '订单3', outRate: 0.45 },
|
||||
// // { id: 4, name: '订单4', outRate: 0.65 },
|
||||
// // { id: 5, name: '订单5', outRate: 0.35 },
|
||||
// // { id: 6, name: '订单6', outRate: 0.15 },
|
||||
// // { id: 7, name: '订单7', outRate: 0.5 },
|
||||
// // { id: 8, name: '订单8', outRate: 0.5 }
|
||||
// // ]
|
||||
// } else {
|
||||
// this.orderProcessList.splice(0)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
change() {
|
||||
this.isFullScreen = screenfull.isFullscreen
|
||||
},
|
||||
|
@ -1,127 +0,0 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div :id="id" :class="className" :style="{ height: height, width:width}" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
import 'echarts/theme/macarons' // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
|
||||
export default {
|
||||
name: 'OverviewBar',
|
||||
mixins: [resize],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: 'OverviewLine'
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
},
|
||||
showLegend: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
legendData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#123341', // 左边线的颜色
|
||||
width: '1'// 坐标线的宽度
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: '#666a74' // 坐标值得具体的颜色
|
||||
|
||||
}
|
||||
},
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#123341', // 左边线的颜色
|
||||
width: '1'// 坐标线的宽度
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: '#666a74' // 坐标值得具体的颜色
|
||||
|
||||
}
|
||||
},
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: 'rgba(180, 180, 180, 0.2)'
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,158 +0,0 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2022-01-23 16:50:39
|
||||
* @LastEditTime: 2022-01-25 15:43:52
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div :id="id" :class="className" :style="{ height: height, width:width}" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
import 'echarts/theme/macarons' // echarts theme
|
||||
import resize from '../mixins/resize'
|
||||
|
||||
export default {
|
||||
name: 'OverviewBar',
|
||||
mixins: [resize],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: 'OverviewLine'
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
},
|
||||
showLegend: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
legendData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: '10%',
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
legend: {
|
||||
itemHeight: 10,
|
||||
x: 'right', // 可设定图例在左、右、居中
|
||||
y: 'top', // 可设定图例在上、下、居中
|
||||
itemWidth: 10,
|
||||
show: this.showLegend,
|
||||
data: this.legendData,
|
||||
right: '1%',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: '#ced1d5'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#123341', // 左边线的颜色
|
||||
width: '1'// 坐标线的宽度
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: '#666a74' // 坐标值得具体的颜色
|
||||
}
|
||||
},
|
||||
data: ['钢一线', '钢二线', '钢三线', '钢四线', '钢五线', '钢六线']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
scale: true,
|
||||
max: 12,
|
||||
min: 0,
|
||||
splitNumber: 5,
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259'
|
||||
}
|
||||
},
|
||||
boundaryGap: [0.2, 0.2],
|
||||
axisLabel: {
|
||||
formatter: '{value} h',
|
||||
textStyle: {
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: this.legendData[0].name,
|
||||
type: 'bar',
|
||||
data: this.legendData[0].data,
|
||||
markLine: {
|
||||
data: [{ type: 'average', name: 'Avg' }]
|
||||
},
|
||||
barWidth: '10%',
|
||||
itemStyle: this.legendData[0].itemStyle
|
||||
},
|
||||
{
|
||||
name: this.legendData[1].name,
|
||||
type: 'bar',
|
||||
data: this.legendData[1].data,
|
||||
barWidth: '10%',
|
||||
itemStyle: this.legendData[1].itemStyle
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,158 +0,0 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2022-01-23 16:50:39
|
||||
* @LastEditTime: 2022-01-25 15:44:26
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div :id="id" :class="className" :style="{ height: height, width:width}" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
import 'echarts/theme/macarons' // echarts theme
|
||||
import resize from '../mixins/resize'
|
||||
|
||||
export default {
|
||||
name: 'OverviewBar',
|
||||
mixins: [resize],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: 'OverviewLine'
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
},
|
||||
showLegend: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
legendData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: '10%',
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
legend: {
|
||||
itemHeight: 10,
|
||||
x: 'right', // 可设定图例在左、右、居中
|
||||
y: 'top', // 可设定图例在上、下、居中
|
||||
itemWidth: 10,
|
||||
show: this.showLegend,
|
||||
data: this.legendData,
|
||||
right: '1%',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: '#ced1d5'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#123341', // 左边线的颜色
|
||||
width: '1'// 坐标线的宽度
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: '#666a74' // 坐标值得具体的颜色
|
||||
}
|
||||
},
|
||||
data: ['钢一线', '钢二线', '钢三线', '钢四线', '钢五线', '钢六线']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
scale: true,
|
||||
max: 12,
|
||||
min: 0,
|
||||
splitNumber: 5,
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259'
|
||||
}
|
||||
},
|
||||
boundaryGap: [0.2, 0.2],
|
||||
axisLabel: {
|
||||
formatter: '{value} h',
|
||||
textStyle: {
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: this.legendData[0].name,
|
||||
type: 'bar',
|
||||
data: this.legendData[0].data,
|
||||
markLine: {
|
||||
data: [{ type: 'average', name: 'Avg' }]
|
||||
},
|
||||
barWidth: '10%',
|
||||
itemStyle: this.legendData[0].itemStyle
|
||||
},
|
||||
{
|
||||
name: this.legendData[1].name,
|
||||
type: 'bar',
|
||||
data: this.legendData[1].data,
|
||||
barWidth: '10%',
|
||||
itemStyle: this.legendData[1].itemStyle
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,144 +0,0 @@
|
||||
<!--
|
||||
* @Author: gtz
|
||||
* @Date: 2022-01-19 15:58:17
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2022-01-24 09:01:07
|
||||
* @Description: file content
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="base-container" :style="{height: height + 'px', fontSize: 12 + 'px'}">
|
||||
<div class="line" />
|
||||
<div class="line line-vertical" />
|
||||
<div class="line line-right" />
|
||||
<div class="line line-right-vertical" />
|
||||
<div class="line line-bottom" />
|
||||
<div class="line line-bottom-vertical" />
|
||||
<div class="line line-bottom-right" />
|
||||
<div class="line line-bottom-right-vertical" />
|
||||
<div class="bar-item">
|
||||
<div v-if="title" class="bar-title">
|
||||
<span>
|
||||
<svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" />
|
||||
{{ title }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="bar-content">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'BaseContainer',
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
titleIcon: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
baseSize: {
|
||||
type: Number,
|
||||
default: 12
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
curIndex: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
changeTab(num) {
|
||||
this.curIndex = num
|
||||
this.$emit('tabSelect', num)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.base-container {
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
background-color: rgba($color: #061027, $alpha: 0.15);
|
||||
position: relative;
|
||||
padding: .5em;
|
||||
border: 2px solid;
|
||||
border-image: linear-gradient(90deg, rgba(82, 255, 241, 0.6), rgba(95, 190, 249, 0), rgba(82, 255, 241, 0.6)) 2 2;
|
||||
.line {
|
||||
position: absolute;
|
||||
border-top: 4px solid #52FFF1;
|
||||
width: 2em;
|
||||
top: -.25em;
|
||||
left: -.25em;
|
||||
&-vertical {
|
||||
top: calc(-5em / 12);
|
||||
left: calc(-1em / 12);
|
||||
transform: rotate(90deg);
|
||||
transform-origin: left;
|
||||
}
|
||||
&-right {
|
||||
top: -.25em;
|
||||
right: -.25em;
|
||||
left: inherit;
|
||||
}
|
||||
&-right-vertical {
|
||||
top: calc(-5em / 12);
|
||||
right: calc(-1em / 12);
|
||||
left: inherit;
|
||||
transform: rotate(-90deg);
|
||||
transform-origin: right;
|
||||
}
|
||||
&-bottom {
|
||||
top: inherit;
|
||||
left: -.25em;
|
||||
bottom: -.25em;
|
||||
}
|
||||
&-bottom-vertical {
|
||||
top: inherit;
|
||||
left: calc(-1em / 12);
|
||||
bottom: calc(-5em / 12);
|
||||
transform: rotate(-90deg);
|
||||
transform-origin: left;
|
||||
}
|
||||
&-bottom-right {
|
||||
top: inherit;
|
||||
left: inherit;
|
||||
right: -.25em;
|
||||
bottom: -.25em;
|
||||
}
|
||||
&-bottom-right-vertical {
|
||||
top: inherit;
|
||||
left: inherit;
|
||||
right: calc(-1em / 12);
|
||||
bottom: calc(-5em / 12);
|
||||
transform: rotate(90deg);
|
||||
transform-origin: right;
|
||||
}
|
||||
}
|
||||
.bar-title {
|
||||
width: 100%;
|
||||
color: #52FFF1;
|
||||
font-size: 1.5em;
|
||||
padding: .1em;
|
||||
}
|
||||
.bar-content{
|
||||
padding: 1em;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,170 +0,0 @@
|
||||
<!--
|
||||
* @Date: 2020-12-14 09:07:03
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-13 16:41:13
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\ProductionAndOperationCenterCockpit\baseTable.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="visual-base-table-container">
|
||||
<el-table
|
||||
v-loading="isLoading"
|
||||
:header-cell-style="{background:'rgba(79,114,136,0.29)',color:'#fff',height: 28 + 'px',padding: 0}"
|
||||
:row-style="setRowStyle"
|
||||
:data="renderData"
|
||||
border
|
||||
style="width: 100%; background: transparent"
|
||||
>
|
||||
<el-table-column
|
||||
v-for="item in renderTableHeadList"
|
||||
:key="item.prop"
|
||||
:show-overflow-tooltip="showOverflow"
|
||||
v-bind="item"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<component :is="item.subcomponent" v-if="item.subcomponent" :inject-data="{...scope.row, ...item}" @emitData="emitData" />
|
||||
<span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<slot name="content" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { isObject, isString } from 'lodash'
|
||||
export default {
|
||||
name: 'BaseTable',
|
||||
filters: {
|
||||
commonFilter: (source, filterType = a => a) => {
|
||||
return filterType(source)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
tableData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
validator: val => val.filter(item => !isObject(item)).length === 0
|
||||
},
|
||||
tableConfig: {
|
||||
type: Array,
|
||||
required: true,
|
||||
validator: val => val.filter(item => !isString(item.prop) || !isString(item.label)).length === 0
|
||||
},
|
||||
isLoading: {
|
||||
type: Boolean,
|
||||
required: false
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 5
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
showOverflow: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableConfigBak: [],
|
||||
selectedBox: new Array(20).fill(true)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
renderData() {
|
||||
if (this.tableData && !this.tableData[0]._pageIndex) {
|
||||
this.tableData.forEach((item, index) => {
|
||||
item._pageIndex = (this.page - 1) * this.limit + index + 1
|
||||
})
|
||||
}
|
||||
return this.tableData.slice((this.page - 1) * this.limit, this.page * this.limit)
|
||||
},
|
||||
renderTableHeadList() {
|
||||
return this.tableConfig.filter((item, index) => {
|
||||
return this.selectedBox[index]
|
||||
})
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
this.selectedBox = new Array(20).fill(true)
|
||||
},
|
||||
// mounted() {
|
||||
// this.tableConfigBak = cloneDeep(this.tableConfig).map(item => {
|
||||
// return {
|
||||
// ...item,
|
||||
// selected: true
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
methods: {
|
||||
emitData(val) {
|
||||
this.$emit('emitFun', val)
|
||||
},
|
||||
setRowStyle(v) {
|
||||
if (v.rowIndex % 2 === 0) {
|
||||
return {
|
||||
background: 'rgba(76,97,123,0.2)',
|
||||
color: '#fff',
|
||||
height: 26 * this.beilv + 'px',
|
||||
padding: 0
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
background: 'rgba(79,114,136,0.29)',
|
||||
color: '#fff',
|
||||
height: 26 * this.beilv + 'px',
|
||||
padding: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "~@/styles/index.scss";
|
||||
.visual-base-table-container {
|
||||
.el-table {
|
||||
border: 0;
|
||||
}
|
||||
.el-table::before,.el-table--border::after {
|
||||
background-color: transparent;
|
||||
}
|
||||
.el-table th,td{
|
||||
border-color: #0D1728 !important;
|
||||
padding: 0;
|
||||
}
|
||||
.el-table tr {
|
||||
background: transparent;
|
||||
}
|
||||
.el-table__row:hover > td {
|
||||
background-color: rgba(79,114,136,0.29) !important;
|
||||
}
|
||||
|
||||
.el-table__row--striped:hover > td {
|
||||
background-color: rgba(79,114,136,0.29) !important;
|
||||
}
|
||||
}
|
||||
// .setting {
|
||||
// text-align: right;
|
||||
// padding: 15px;
|
||||
// .setting-box {
|
||||
// width: 100px;
|
||||
// }
|
||||
// i {
|
||||
// color: #aaa;
|
||||
// @extend .pointer;
|
||||
// }
|
||||
// }
|
||||
|
||||
</style>
|
@ -1,31 +0,0 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2022-01-23 21:02:57
|
||||
* @LastEditTime: 2022-01-23 21:08:21
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div
|
||||
style=" width: 1em;
|
||||
height: 1em;
|
||||
border-radius: 50%;
|
||||
margin:auto"
|
||||
:style="{background:injectData.colour}"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
emitClick() {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,60 +0,0 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2022-01-22 18:05:45
|
||||
* @LastEditTime: 2022-01-23 10:50:29
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div style="width:100%,text-align:center">
|
||||
<div style="text-align:center">
|
||||
<el-radio-group v-model="dateType" size="mini">
|
||||
<el-radio-button v-for="item in labelList" :key="item.index" :label="item.index">
|
||||
{{ item.label }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TopGroup',
|
||||
props: {
|
||||
dateType: {
|
||||
type: String,
|
||||
default: '0'
|
||||
},
|
||||
labelList: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-radio-button__inner {
|
||||
width: 100%;
|
||||
border: none;
|
||||
background: #133648;
|
||||
margin-bottom: 1em;
|
||||
margin-top: -0.5em;
|
||||
color: white;
|
||||
line-height: 14px;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
|
||||
background: #3eb0ae;
|
||||
border: none;
|
||||
color: white;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
</style>
|
@ -1,83 +0,0 @@
|
||||
<!--
|
||||
* @Author: gtz
|
||||
* @Date: 2022-01-20 14:12:10
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2022-01-25 16:57:00
|
||||
* @Description: file content
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\ProductionLineMonitoringCockpit\nowTeam.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="now-team">
|
||||
<el-row style="margin-bottom: 3em">
|
||||
<p class="now-team-title">- 开始时间 -</p>
|
||||
<p class="now-team-content blue">2021.1.26 13:30:21</p>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 1em">
|
||||
<el-col :span="8">
|
||||
<p class="now-team-title">- 班组名称 -</p>
|
||||
<p style="font-size:2em" class="now-team-content blue">中班执行一组</p>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<p class="now-team-title">- 原片投入(片) -</p>
|
||||
<p class="now-team-content blue">122</p>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<p class="now-team-title">- 投入面积(㎡) -</p>
|
||||
<p class="now-team-content blue">12000</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<p class="now-team-title">- 产品规格 -</p>
|
||||
<p class="now-team-content blue">110</p>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<p class="now-team-title">- 执行工单 -</p>
|
||||
<p class="now-team-content blue">110</p>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<p class="now-team-title">- 成品率 -</p>
|
||||
<p class="now-team-content blue">98.8%</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'ProductionMonitoringCockpit',
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.now-team{
|
||||
width: 100%;
|
||||
.now-team-title{
|
||||
font-size: 1em;
|
||||
line-height: 2em;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
.now-team-content{
|
||||
font-size: 2.5em;
|
||||
font-weight: 300;
|
||||
line-height: 1em;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
.blue {
|
||||
color: #52FFF1;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,229 +0,0 @@
|
||||
<!--
|
||||
* @Author: lb
|
||||
* @Date: 2022-01-21 14:43:06
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-02-07 13:46:05
|
||||
* @Description: 简单折线图
|
||||
-->
|
||||
<template>
|
||||
<div ref="SimpleLineChart" :style="{ height: height ? height + 'px' : '100%', width: '100%' }" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
import 'echarts/theme/macarons' // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
|
||||
const AxisLine = {
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#123341',
|
||||
width: '1'
|
||||
}
|
||||
}
|
||||
|
||||
const AxisLabel = {
|
||||
textStyle: {
|
||||
color: '#666a74'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 2022.8.23 TODO:
|
||||
* 1.一份数据三张表
|
||||
* 2.切换选项卡时只更新一张表的数据
|
||||
* 3.注释掉成品率条形图,改为将“投入、产出”拆分图,与“成品率”合计三张
|
||||
*/
|
||||
|
||||
class ChartOption {
|
||||
constructor() {
|
||||
this.color = [
|
||||
'#3574a8',
|
||||
'#9f3476',
|
||||
'#30959d',
|
||||
'#5255be',
|
||||
'#8b4449',
|
||||
'#a29848',
|
||||
'#FF6600',
|
||||
'#FFFF00',
|
||||
'#91cc75',
|
||||
'#fac858',
|
||||
'#ee6666',
|
||||
'#73c0de',
|
||||
'#3ba272',
|
||||
'#fc8452',
|
||||
'#9a60b4',
|
||||
'#ea7ccc'
|
||||
]
|
||||
this.tooltip = { trigger: 'axis' }
|
||||
this.grid = {
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '5%',
|
||||
height: '80%',
|
||||
containLabel: true
|
||||
}
|
||||
this.legend = {
|
||||
itemHeight: 10,
|
||||
itemWidth: 10,
|
||||
y: 'top',
|
||||
x: 'center',
|
||||
top: 0,
|
||||
// right: '1%',
|
||||
data: [
|
||||
/** dynamic */
|
||||
],
|
||||
// right: '1%',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: '#ced1d5'
|
||||
}
|
||||
}
|
||||
this.xAxis = {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
splitLine: { show: false },
|
||||
axisLine: AxisLine,
|
||||
axisLabel: { ...AxisLabel, rotate: 20 },
|
||||
data: [
|
||||
/** dynamic */
|
||||
]
|
||||
}
|
||||
this.yAxis = {
|
||||
type: 'value',
|
||||
splitLine: { show: false },
|
||||
axisLine: AxisLine,
|
||||
axisLabel: AxisLabel
|
||||
}
|
||||
this.series = [
|
||||
/** dynmaic */
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} rawdata
|
||||
*/
|
||||
setLegend(rawdata) {
|
||||
if (rawdata) {
|
||||
const data = Object.keys(rawdata)
|
||||
this.legend.data = data.map(item => ({ icon: 'roundRect', name: item }))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} rawdata
|
||||
*/
|
||||
setCategory(rawdata) {
|
||||
if (rawdata) {
|
||||
if (Object.keys(rawdata).length > 0) {
|
||||
const first = rawdata[Object.keys(rawdata)[0]]
|
||||
this.xAxis.data = Object.keys(first)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} rawdata
|
||||
*/
|
||||
setData(rawdata) {
|
||||
if (rawdata) {
|
||||
this.series = []
|
||||
for (const key in rawdata) {
|
||||
this.series.push({
|
||||
name: key,
|
||||
type: 'line',
|
||||
data: Object.entries(rawdata[key]).map(([subkey, value]) => value)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
clearOptions() {
|
||||
this.legend.data.splice(0)
|
||||
this.xAxis.data.splice(0)
|
||||
this.series.splice(0)
|
||||
}
|
||||
// add more...
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'SimpleLineChart',
|
||||
mixins: [resize],
|
||||
props: {
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
legend: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
caty: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
dataList: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
defaultOpts: new ChartOption()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showLegend() {
|
||||
return this.legend.length > 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dataList: {
|
||||
handler: function(val) {
|
||||
this.updateChartOptions()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.chart) {
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
if (!this.chart) {
|
||||
this.chart = echarts.init(this.$refs.SimpleLineChart)
|
||||
this.updateChartOptions()
|
||||
}
|
||||
},
|
||||
|
||||
updateChartOptions() {
|
||||
if (!this.chart) return
|
||||
this.defaultOpts.clearOptions()
|
||||
/** set */
|
||||
this.defaultOpts.setLegend(this.dataList)
|
||||
this.defaultOpts.setCategory(this.dataList)
|
||||
this.defaultOpts.setData(this.dataList)
|
||||
/** log */
|
||||
this.chart.setOption({ ...this.defaultOpts })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.chart {
|
||||
margin-top: -3em;
|
||||
}
|
||||
</style>
|
@ -1,51 +0,0 @@
|
||||
<!--
|
||||
* @Date: 2020-12-14 09:07:03
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-23 00:14:53
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span class="alarm-level">
|
||||
<span
|
||||
style="display: inline-block; height: .6em;width: .6em; border-radius: .3em; position: relative;"
|
||||
:style="{background: colorList[injectData.level].back, boxShadow: `0px 0px 2px 2px ${colorList[injectData.level].border}`}"
|
||||
/>
|
||||
{{ injectData.level }}级
|
||||
</span>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'NextDay',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
colorList: {
|
||||
1: {
|
||||
back: 'rgba(255, 12, 12, 1)',
|
||||
border: 'rgba(255, 12, 12, .5)'
|
||||
},
|
||||
2: {
|
||||
back: 'rgba(255, 183, 12, 1)',
|
||||
border: 'rgba(255, 183, 12, .5)'
|
||||
},
|
||||
3: {
|
||||
back: 'rgba(39, 96, 255, 1)',
|
||||
border: 'rgba(39, 96, 255, .5)'
|
||||
},
|
||||
4: {
|
||||
back: 'rgba(12, 255, 30, 1)',
|
||||
border: 'rgba(12, 255, 30, .5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,187 +0,0 @@
|
||||
<!--
|
||||
* @Author: gtz
|
||||
* @Date: 2022-01-19 15:58:17
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-09-21 16:15:14
|
||||
* @Description: file content
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||
-->
|
||||
<template>
|
||||
<div
|
||||
class="base-container"
|
||||
:style="{ height: '100%', fontSize: 12 + 'px', padding: 12 + 'px' }"
|
||||
:class="{ 'no-padding': noPadding, 'border-none': !showLine }"
|
||||
>
|
||||
<!-- <div class="base-container" :style="{height: height + 'px', fontSize: 12 + 'px', padding: 12 + 'px'}"> -->
|
||||
<template v-if="showLine">
|
||||
<div class="line" />
|
||||
<div class="line line-vertical" />
|
||||
<div class="line line-right" />
|
||||
<div class="line line-right-vertical" />
|
||||
<div class="line line-bottom" />
|
||||
<div class="line line-bottom-vertical" />
|
||||
<div class="line line-bottom-right" />
|
||||
<div class="line line-bottom-right-vertical" />
|
||||
</template>
|
||||
|
||||
<div class="bar-item">
|
||||
<div v-if="title" class="bar-title">
|
||||
<span>
|
||||
<svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" />
|
||||
{{ title }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="bar-content" :class="{ 'p-0': noContentPadding }">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'BaseContainer',
|
||||
props: {
|
||||
showLine: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
noPadding: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
noContentPadding: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
titleIcon: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
baseSize: {
|
||||
type: Number,
|
||||
default: 12
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
curIndex: 0
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
changeTab(num) {
|
||||
this.curIndex = num
|
||||
this.$emit('tabSelect', num)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.base-container {
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
background-color: rgba($color: #061027, $alpha: 0.15);
|
||||
position: relative;
|
||||
// border: 2px solid;
|
||||
background: url('../../../../assets/img/bg-bottom-item.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
// border-radius: 40px 0px 40px 0px;
|
||||
// border-image: linear-gradient(360deg, rgba(157, 246, 254, 0.05), rgba(100, 233, 252, 0.9)) 2 2;
|
||||
// .line {
|
||||
// position: absolute;
|
||||
// border-top: 4px solid #52fff1;
|
||||
// width: 2em;
|
||||
// top: -0.25em;
|
||||
// left: -0.25em;
|
||||
// &-vertical {
|
||||
// top: calc(-5em / 12);
|
||||
// left: calc(-1em / 12);
|
||||
// transform: rotate(90deg);
|
||||
// transform-origin: left;
|
||||
// }
|
||||
// &-right {
|
||||
// top: -0.25em;
|
||||
// right: -0.25em;
|
||||
// left: inherit;
|
||||
// }
|
||||
// &-right-vertical {
|
||||
// top: calc(-5em / 12);
|
||||
// right: calc(-1em / 12);
|
||||
// left: inherit;
|
||||
// transform: rotate(-90deg);
|
||||
// transform-origin: right;
|
||||
// }
|
||||
// &-bottom {
|
||||
// top: inherit;
|
||||
// left: -0.25em;
|
||||
// bottom: -0.25em;
|
||||
// }
|
||||
// &-bottom-vertical {
|
||||
// top: inherit;
|
||||
// left: calc(-1em / 12);
|
||||
// bottom: calc(-5em / 12);
|
||||
// transform: rotate(-90deg);
|
||||
// transform-origin: left;
|
||||
// }
|
||||
// &-bottom-right {
|
||||
// top: inherit;
|
||||
// left: inherit;
|
||||
// right: -0.25em;
|
||||
// bottom: -0.25em;
|
||||
// }
|
||||
// &-bottom-right-vertical {
|
||||
// top: inherit;
|
||||
// left: inherit;
|
||||
// right: calc(-1em / 12);
|
||||
// bottom: calc(-5em / 12);
|
||||
// transform: rotate(90deg);
|
||||
// transform-origin: right;
|
||||
// }
|
||||
// }
|
||||
|
||||
.bar-item {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.bar-title {
|
||||
width: 100%;
|
||||
color: #52fff1;
|
||||
font-size: 1.5em;
|
||||
padding: 0.67em;
|
||||
}
|
||||
|
||||
.bar-content {
|
||||
padding: 1em;
|
||||
flex: 1 auto;
|
||||
}
|
||||
|
||||
.no-padding {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.p-0 {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&.border-none {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Date: 2020-12-14 09:07:03
|
||||
* @Author: zhp
|
||||
* @Date: 2024-03-26 09:20:18
|
||||
* @LastEditTime: 2024-03-26 09:20:18
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-01-12 14:30:46
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -158,7 +158,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "../styles/index.scss";
|
||||
// @import "../styles/index.scss";
|
||||
.visual-base-table-container {
|
||||
.el-table {
|
||||
border: 0;
|
||||
|
@ -1,40 +0,0 @@
|
||||
<!--
|
||||
* @Date: 2020-12-14 09:07:03
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-13 16:41:28
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="base-video-container">
|
||||
<!-- <video id="v1" :style="{height: videoHeight + 'px'}" :src="require('../../../assets/video/3d.mkv')" autoplay loop muted /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'BaseVideo',
|
||||
props: {
|
||||
videoHeight: {
|
||||
type: Number,
|
||||
default: () => 200
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: () => 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.base-video-container{
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
@ -2,7 +2,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-09-21 09:06:28
|
||||
* @LastEditTime: 2024-01-29 15:39:59
|
||||
* @LastEditTime: 2024-03-25 18:34:58
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -158,7 +158,7 @@ export default {
|
||||
legend: {
|
||||
itemWidth: 10,
|
||||
itemHeight: 10,
|
||||
top: '1%',
|
||||
top: '20',
|
||||
// right: '20px',
|
||||
data: ['产线产量', '产线良品率'],
|
||||
textStyle: {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-09-21 09:06:28
|
||||
* @LastEditTime: 2024-03-13 08:51:12
|
||||
* @LastEditTime: 2024-03-26 16:16:50
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div :id="id" :class="className" :style="{ height: height + 'px', width: width }" />
|
||||
<div :id="id" :class="className" :style="{ height: '420px', width: width }" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,7 +19,7 @@ export default {
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
default: 'enChart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
@ -84,7 +84,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initChart(nameList, dataList) {
|
||||
console.log('1111', dataList);
|
||||
// console.log('1111', dataList);
|
||||
// console.log(1)
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
// if (dataList.length !== 0) {
|
||||
@ -123,13 +123,7 @@ export default {
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 30,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
grid: { top: 90, right: 60, bottom: 20, left: 90 },
|
||||
// legend: {
|
||||
// itemWidth: 10,
|
||||
// itemHeight: 10,
|
||||
@ -205,4 +199,11 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.enChart {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: -30px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,40 +0,0 @@
|
||||
<!--
|
||||
* @Date: 2020-12-14 09:07:03
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-23 00:14:53
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="next-day" :style="{background: injectData.nextLong < 0 ? 'rgba(255, 84, 76, 0.6)' : injectData.nextLong < 10 ? 'rgba(251, 211, 80, 0.6)' : 'rgba(142, 254, 83, 0.6)'}">
|
||||
{{ injectData.nextLong }}
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'NextDay',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.next-day{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-27 13:54:52
|
||||
* @LastEditTime: 2024-03-13 09:04:11
|
||||
* @LastEditTime: 2024-03-26 10:50:30
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -92,18 +92,17 @@ export default {
|
||||
methods: {
|
||||
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
|
||||
let rawData = []
|
||||
rawData.push(passRateList,wasteList)
|
||||
// console.log(1)
|
||||
const totalData = [];
|
||||
for (let i = 0; i < rawData[0].length; ++i) {
|
||||
let sum = 0;
|
||||
for (let j = 0; j < rawData.length; ++j) {
|
||||
sum += rawData[j][i];
|
||||
let colors = ['#0fdedb', '#2359ec']
|
||||
rawData.push(passRateList, wasteList)
|
||||
const totalData = [];
|
||||
for (let i = 0; i < rawData[0].length; ++i) {
|
||||
let sum = 0;
|
||||
for (let j = 0; j < rawData.length; ++j) {
|
||||
sum += rawData[j][i];
|
||||
}
|
||||
totalData.push(sum);
|
||||
}
|
||||
totalData.push(sum);
|
||||
}
|
||||
let colors = ['#0fdedb', '#2359ec' ]
|
||||
console.log('total', totalData);
|
||||
console.log('total', totalData);
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
const series = [
|
||||
'良品',
|
||||
@ -123,55 +122,16 @@ export default {
|
||||
formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
|
||||
},
|
||||
color:colors[sid],
|
||||
data: rawData[sid].map((d, did) =>
|
||||
data: rawData.length != 0 ? rawData[sid].map((d, did) =>
|
||||
totalData[did] <= 0 ? 0 : d / totalData[did]
|
||||
)
|
||||
) : []
|
||||
};
|
||||
});
|
||||
// let series = [
|
||||
// {
|
||||
// // 辅助系列
|
||||
// name: '良品',
|
||||
// type: 'bar',
|
||||
// stack: 'total',
|
||||
// // silent: true,
|
||||
// // itemStyle: {
|
||||
// color: '#0fdedb',
|
||||
// // },
|
||||
// // barCategoryGap: '10%',
|
||||
// barWidth: 10,
|
||||
// data: passRateList
|
||||
// },
|
||||
// {
|
||||
// type: 'bar',
|
||||
// stack: 'total',
|
||||
// name: '废品',
|
||||
// // barCategoryGap: '10%',
|
||||
// data: wasteList,
|
||||
// // barWidth: 10,
|
||||
// // barWidth: 15,
|
||||
// // label: {
|
||||
// // position: [10, 10],
|
||||
// // normal: {
|
||||
// // position: [800, -24],
|
||||
// // show: true,
|
||||
// // textStyle: {
|
||||
// // color: '#2359ec',
|
||||
// // fontSize: 16,
|
||||
// // },
|
||||
// // },
|
||||
// // },
|
||||
// }
|
||||
// ]
|
||||
// for (i = 0; i < 5; i++) {
|
||||
// series.push({
|
||||
|
||||
// })
|
||||
// }
|
||||
this.chart.setOption({
|
||||
legend: {
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
top:'10',
|
||||
icon: 'rect',
|
||||
textStyle: {
|
||||
color: '#ffffff'
|
||||
|
@ -1,237 +0,0 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div :id="id" :class="className" :style="{ height: height + 'px', width:width}" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
import 'echarts/theme/macarons' // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
|
||||
export default {
|
||||
name: 'OverviewBar',
|
||||
mixins: [resize],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: 'threeBarChart'
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
showLegend: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
nameList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
dataList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
series: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.dataList.length > 1) {
|
||||
this.series = [
|
||||
{ // 柱体
|
||||
name: this.dataList[0].name,
|
||||
type: 'bar',
|
||||
barWidth: 30,
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[0].topColor },
|
||||
{ offset: 1, color: this.dataList[0].bottomColor }
|
||||
])
|
||||
},
|
||||
data: this.dataList[0].data
|
||||
},
|
||||
{ // 柱顶
|
||||
name: this.dataList[0].name,
|
||||
type: 'pictorialBar',
|
||||
barWidth: 20,
|
||||
symbol: 'diamond',
|
||||
symbolPosition: 'end',
|
||||
symbolOffset: [0, '-50%'],
|
||||
symbolSize: [30, 12],
|
||||
zlevel: 2,
|
||||
itemStyle: { color: this.dataList[0].topColor },
|
||||
data: this.dataList[0].data
|
||||
},
|
||||
{ // 柱底
|
||||
name: this.dataList[0].name,
|
||||
type: 'pictorialBar',
|
||||
barWidth: 20,
|
||||
symbol: 'diamond',
|
||||
symbolOffset: [0, '50%'],
|
||||
symbolSize: [30, 15],
|
||||
itemStyle: { color: this.dataList[0].bottomColor },
|
||||
data: this.dataList[0].data
|
||||
},
|
||||
{ // 柱体
|
||||
name: this.dataList[1].name,
|
||||
type: 'bar',
|
||||
barWidth: 30,
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[1].topColor },
|
||||
{ offset: 1, color: this.dataList[1].bottomColor }
|
||||
])
|
||||
},
|
||||
data: this.dataList[1].data
|
||||
},
|
||||
{ // 柱顶
|
||||
name: this.dataList[1].name,
|
||||
type: 'pictorialBar',
|
||||
barWidth: 20,
|
||||
symbol: 'diamond',
|
||||
symbolPosition: 'end',
|
||||
symbolOffset: [0, '-50%'],
|
||||
symbolSize: [30, 12],
|
||||
zlevel: 2,
|
||||
itemStyle: { color: this.dataList[1].topColor },
|
||||
data: this.dataList[1].data
|
||||
},
|
||||
{ // 柱底
|
||||
name: this.dataList[1].name,
|
||||
type: 'pictorialBar',
|
||||
barWidth: 20,
|
||||
symbol: 'diamond',
|
||||
symbolOffset: [0, '50%'],
|
||||
symbolSize: [30, 15],
|
||||
itemStyle: { color: this.dataList[1].topColor },
|
||||
data: this.dataList[1].data
|
||||
}
|
||||
]
|
||||
} else {
|
||||
this.series = [
|
||||
{ // 柱体
|
||||
name: this.dataList[0].name,
|
||||
type: 'bar',
|
||||
barWidth: 12,
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[0].topColor },
|
||||
{ offset: 1, color: this.dataList[0].bottomColor }
|
||||
])
|
||||
},
|
||||
data: this.dataList[0].data
|
||||
},
|
||||
{ // 柱顶
|
||||
name: this.dataList[0].name,
|
||||
type: 'pictorialBar',
|
||||
barWidth: 12,
|
||||
symbol: 'diamond',
|
||||
symbolPosition: 'end',
|
||||
symbolOffset: [0, '-50%'],
|
||||
symbolSize: [12, 6],
|
||||
zlevel: 2,
|
||||
itemStyle: { color: this.dataList[0].topColor },
|
||||
data: this.dataList[0].data
|
||||
},
|
||||
{ // 柱底
|
||||
name: this.dataList[0].name,
|
||||
type: 'pictorialBar',
|
||||
barWidth: 12,
|
||||
symbol: 'diamond',
|
||||
symbolOffset: [0, '50%'],
|
||||
symbolSize: [12, 6],
|
||||
itemStyle: { color: this.dataList[0].bottomColor },
|
||||
data: this.dataList[0].data
|
||||
}
|
||||
]
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
console.log(this.series)
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#213259', // 左边线的颜色
|
||||
width: '1'// 坐标线的宽度
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||
}
|
||||
},
|
||||
data: this.nameList
|
||||
},
|
||||
yAxis: {
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#213259', // 左边线的颜色
|
||||
width: '1'// 坐标线的宽度
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259'
|
||||
}
|
||||
},
|
||||
type: 'value'
|
||||
},
|
||||
series: this.series
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,86 +0,0 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2022-01-21 14:27:34
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-21 15:55:08
|
||||
* @Description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="top-radio-group" style="width:100%;text-align:center;">
|
||||
<el-radio-group v-model="radioModel" size="mini" @change="handleChange">
|
||||
<el-radio-button v-for="item in radioList" :key="item.value" :label="item.value">
|
||||
{{ item.name }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TopRadioGroup',
|
||||
props: {
|
||||
dateType: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
radioList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [{ value: '0', name: '当天' }, { value: '1', name: '本周' }, { value: '2', name: '本月' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
radioModel: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.radioModel = this.dateType
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleChange(v) {
|
||||
this.$emit('change-time-range', v)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.top-radio-group >>> .el-radio-group {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.top-radio-group >>> .el-radio-button {
|
||||
flex: 1 1;
|
||||
}
|
||||
|
||||
.top-radio-group >>> .el-radio-button__inner {
|
||||
padding: 4px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
::v-deep .el-radio-button__inner {
|
||||
width: 100%;
|
||||
border: none;
|
||||
background: #133648;
|
||||
padding: 3px 2em;
|
||||
margin-bottom: 1em;
|
||||
margin-top: -0.5em;
|
||||
color: white;
|
||||
line-height: 14px;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
|
||||
background: #3eb0ae;
|
||||
border: none;
|
||||
color: white;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
</style>
|
@ -1,67 +0,0 @@
|
||||
<!--
|
||||
* @Date: 2020-12-14 09:07:03
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-23 00:14:53
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-row class="util-chart">
|
||||
<el-col :span="20" class="chart-main-box">
|
||||
<div class="chart-main">
|
||||
<div class="chart-cover" :style="{width: percent + '%', backgroundImage: `linear-gradient(to right, ${leftColor}, ${rightColor})`}" />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
{{ percent }}%
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'UtilChart',
|
||||
props: {
|
||||
percent: {
|
||||
type: Number,
|
||||
default: () => 0
|
||||
},
|
||||
leftColor: {
|
||||
type: String,
|
||||
default: () => 'rgba(18, 149, 255, 1)'
|
||||
},
|
||||
rightColor: {
|
||||
type: String,
|
||||
default: () => 'rgba(157, 213, 255, 1)'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.util-chart{
|
||||
width: 100%;
|
||||
.chart-main-box {
|
||||
position: relative;
|
||||
height: 1em;
|
||||
.chart-main {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: rgba(30, 45, 69, 1);
|
||||
border-radius: 1em;
|
||||
.chart-cover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-radius: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,66 +0,0 @@
|
||||
<!--
|
||||
* @Date: 2020-12-14 09:07:03
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-23 00:14:53
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-row class="base-footer-container" :style="{height: 36 + 'px'}">
|
||||
<el-col v-for="item in footerList" :key="item" :span="4" class="base-footer-item" :style="{lineHeight: 36 + 'px', fontSize: 18 + 'px'}" :class="check === item ? 'isActive' : ''" @click.native="handleCheck(item)">
|
||||
{{ item }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'BaseFooter',
|
||||
props: {
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: () => 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
footerList: ['钢1线', '钢2线', '钢3线', '钢4线', '钢5线', '钢6线'],
|
||||
check: '钢1线'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleCheck(name) {
|
||||
this.check = name
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.base-footer-container{
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
.base-footer-item {
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background: rgba($color: #133648, $alpha: 0.29);
|
||||
}
|
||||
.isActive {
|
||||
background: linear-gradient(to right, rgba($color: #4E8E9B, $alpha: 0.29), #2DA99F, rgba($color: #265562, $alpha: 0.29));
|
||||
position: relative;
|
||||
}
|
||||
.isActive::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: 0;
|
||||
height:0;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
transform-origin: 50% 100% 0;
|
||||
transform: perspective(40px) rotateX(45deg);
|
||||
background-image: linear-gradient(to right, rgba($color: #4E8E9B, $alpha: 0.29), #2DA99F, rgba($color: #265562, $alpha: 0.29));
|
||||
}
|
||||
}
|
||||
</style>
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-21 16:07:39
|
||||
* @LastEditTime: 2024-03-26 17:57:44
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -16,24 +16,11 @@
|
||||
许昌安彩深加工看板
|
||||
<h3 class="unit">单位:河南汇融数字科技有限公司</h3>
|
||||
<h3 class="time">{{ times }}</h3>
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
class="title-button"
|
||||
:style="{ right: 33 + 'px', top: 37 + 'px' }"
|
||||
@click="changeFullScreen"
|
||||
>
|
||||
<svg-icon v-if="isFullScreen" icon-class="unFullScreenView" />
|
||||
<svg-icon v-else icon-class="fullScreenView" />
|
||||
</el-button> -->
|
||||
</el-row>
|
||||
<el-row class="container-main flex-col" type="flex">
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1" style="height: 50%;">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||
<base-container :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
|
||||
:table-data="equipmentList" /> -->
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
|
||||
:table-data="qualityYearList" /> -->
|
||||
<dv-scroll-board class="eqTable" :config="eqConfig" style="width:100%;height:350px" ref='eqScrollBoard' />
|
||||
|
||||
</base-container>
|
||||
@ -41,36 +28,18 @@
|
||||
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||
<base-container :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
|
||||
:table-data="qualityMonthList" /> -->
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
|
||||
:table-data="qualityMonthList" /> -->
|
||||
<dv-scroll-board :config="processConfig" style="width:100%;height:350px" ref='processScrollBoard' />
|
||||
</base-container>
|
||||
</el-col>
|
||||
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||
<base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'order'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
|
||||
<!-- 为外部添加一个容器并显式地设置一个高度: -->
|
||||
<!-- <div style="height: 300px;"> -->
|
||||
<div style="width:100%; overflow: hidden scroll;">
|
||||
<!-- <el-row style="margin-bottom: 1em">
|
||||
<p class="now-team-title">加工工单进度</p>
|
||||
</el-row> -->
|
||||
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: 1em">
|
||||
<!-- <el-col :span="12"> -->
|
||||
<p class="now-secondary-title">{{ op.name }}</p>
|
||||
<el-progress define-back-color="rgba(32, 57, 96, 1)" text-color="white"
|
||||
:percentage="op.progressRate * 100" class="custom-progress-bar" />
|
||||
<!-- <p v-if="op.progressRate === 1" class="now-secondary-title" style="color:#4679FD">
|
||||
<i class="el-icon-check" />
|
||||
{{ op.name }}
|
||||
</p> -->
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
@ -82,368 +51,62 @@
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :show-yes-time="true" :no-content-padding="true" :height="256" :size="'middle'" :title="'能源监控'"
|
||||
:title-icon="'energyMonitoring'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
<el-row :gutter="9">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
||||
<linear-bar-chart ref="EnergyMonitoringChart" :name-list="EnergyMonitoringNameList"
|
||||
:data-list="EnergyMonitoringList" :height="359" />
|
||||
</el-col>
|
||||
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-table3
|
||||
:page="2"
|
||||
:limit="5"
|
||||
|
||||
:table-config="qualityTableProps2"
|
||||
:table-data="qualityList2"
|
||||
/>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</base-container>
|
||||
</el-col>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'middle'"
|
||||
:title="'产线产量及良品率'" :title-icon="'productLine'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
||||
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="390" :show-legend="true" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- end -->
|
||||
<!-- <el-col :span="16">
|
||||
<el-row>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
||||
<base-container :height="672">
|
||||
<base-video :video-height="624" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
-->
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseContainer from './components/baseContainer'
|
||||
|
||||
import baseTable1 from './components/baseTable'
|
||||
// import baseTable2 from './components/baseTable'
|
||||
// import baseTable3 from './components/baseTable'
|
||||
import TopRadioGroup from './components/topRadioGroup'
|
||||
// import pieChart1 from './components/PieChart'
|
||||
// import pieChart2 from './components/PieChart'
|
||||
// import pieChart3 from './components/PieChart'
|
||||
// import { mapGetters } from 'vuex'
|
||||
import screenfull from 'screenfull'
|
||||
// import BaseVideo from './components/baseVideo.vue'
|
||||
import alarmLevel from './components/alarmLevel'
|
||||
// import axios from '@/utils/request'
|
||||
import doubleYChart from './components/doubleYChart '
|
||||
// import elementResizeDetectorMaker from 'element-resize-detector';
|
||||
// var erd = elementResizeDetectorMaker(); //创建实例
|
||||
// let resizeFun = null
|
||||
|
||||
import LinearBarChart from './components/linearBarChart'
|
||||
const qualityTableProps1 = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: '产线名称'
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '发生时间'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '质量编码'
|
||||
},
|
||||
{
|
||||
prop: 'content',
|
||||
label: '质量内容'
|
||||
}
|
||||
]
|
||||
const qualityTableProps2 = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: '工序名称'
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '发生时间'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '质量编码'
|
||||
},
|
||||
{
|
||||
prop: 'content',
|
||||
label: '质量内容'
|
||||
}
|
||||
]
|
||||
const cxNameList = ['周一', '周二', '周三', '周四', '周五']
|
||||
|
||||
const cxDataList = [
|
||||
{
|
||||
topColor: '#9DD5FF',
|
||||
bottomColor: '#1295FF',
|
||||
name: '电耗能',
|
||||
data: [100, 150, 121, 97, 140]
|
||||
},
|
||||
{
|
||||
topColor: '#FF8BC3',
|
||||
bottomColor: '#EB46A1',
|
||||
name: '水耗能',
|
||||
data: [110, 110, 151, 77, 110]
|
||||
},
|
||||
{
|
||||
topColor: '#85F6E9',
|
||||
bottomColor: '#2EC6B4',
|
||||
name: '天然气',
|
||||
data: [110, 120, 171, 287, 40]
|
||||
},
|
||||
{
|
||||
topColor: '#9496FF',
|
||||
bottomColor: '#6567FF',
|
||||
name: '焦炉煤气',
|
||||
data: [140, 157, 122, 27, 240]
|
||||
},
|
||||
{
|
||||
topColor: '#F68E8A',
|
||||
bottomColor: '#E95552',
|
||||
name: '余热发电',
|
||||
data: [170, 180, 127, 17, 340]
|
||||
},
|
||||
{
|
||||
topColor: '#FFE873',
|
||||
bottomColor: '#E7AE2A',
|
||||
name: '二氧化硫',
|
||||
data: [140, 160, 121, 57, 170]
|
||||
}
|
||||
]
|
||||
|
||||
const qualityList1 = [
|
||||
{ name: '钢一线', createTime: '2021.10.21 24:59:59', code: '2121321231', content: '气泡' },
|
||||
{ name: '钢二线', createTime: '2021.11.22 24:59:59', code: '3321123213', content: '气泡' },
|
||||
{ name: '钢三线', createTime: '2021.12.12 24:59:59', code: '4535435345', content: '气泡' },
|
||||
{ name: '钢四线', createTime: '2021.12.20 24:59:59', code: '5465465466', content: '气泡' },
|
||||
{ name: '钢五线', createTime: '2021.12.02 24:59:59', code: '2132131312', content: '气泡' },
|
||||
{ name: '钢一线', createTime: '2021.10.21 24:59:59', code: '2121321231', content: '气泡' },
|
||||
{ name: '钢二线', createTime: '2021.11.22 24:59:59', code: '3321123213', content: '气泡' },
|
||||
{ name: '钢三线', createTime: '2021.12.12 24:59:59', code: '4535435345', content: '气泡' },
|
||||
{ name: '钢四线', createTime: '2021.12.20 24:59:59', code: '5465465466', content: '气泡' },
|
||||
{ name: '钢五线', createTime: '2021.12.02 24:59:59', code: '2132131312', content: '气泡' },
|
||||
{ name: '钢一线', createTime: '2021.10.21 24:59:59', code: '2121321231', content: '气泡' },
|
||||
{ name: '钢二线', createTime: '2021.11.22 24:59:59', code: '3321123213', content: '气泡' },
|
||||
{ name: '钢三线', createTime: '2021.12.12 24:59:59', code: '4535435345', content: '气泡' },
|
||||
{ name: '钢四线', createTime: '2021.12.20 24:59:59', code: '5465465466', content: '气泡' },
|
||||
{ name: '钢五线', createTime: '2021.12.02 24:59:59', code: '2132131312', content: '气泡' },
|
||||
{ name: '钢六线', createTime: '2021.12.11 24:59:59', code: '2132131212', content: '气泡' }
|
||||
]
|
||||
const qualityList2 = [
|
||||
{ name: '上片', createTime: '2021.10.22 24:59:59', code: '2132132133', content: '气泡' },
|
||||
{ name: '磨边', createTime: '2021.12.21 24:59:59', code: '2132131232', content: '气泡' },
|
||||
{ name: '清洗', createTime: '2021.12.12 24:59:59', code: '1232131312', content: '气泡' },
|
||||
{ name: '激光打孔', createTime: '2021.12.13 24:59:59', code: '2132132131', content: '气泡' },
|
||||
{ name: 'AR镀膜', createTime: '2021.10.23 24:59:59', code: '2311212232', content: '气泡' },
|
||||
{ name: '固化', createTime: '2021.09.22 24:59:59', code: '21321321312', content: '气泡' },
|
||||
{ name: '清洗', createTime: '2021.12.12 24:59:59', code: '1232131312', content: '气泡' },
|
||||
{ name: '激光打孔', createTime: '2021.12.13 24:59:59', code: '2132132131', content: '气泡' },
|
||||
{ name: 'AR镀膜', createTime: '2021.10.23 24:59:59', code: '2311212232', content: '气泡' },
|
||||
{ name: '固化', createTime: '2021.09.22 24:59:59', code: '21321321312', content: '气泡' },
|
||||
{ name: '上片', createTime: '2021.10.22 24:59:59', code: '2132132133', content: '气泡' },
|
||||
{ name: '磨边', createTime: '2021.12.21 24:59:59', code: '2132131232', content: '气泡' },
|
||||
{ name: '清洗', createTime: '2021.12.12 24:59:59', code: '1232131312', content: '气泡' },
|
||||
{ name: '激光打孔', createTime: '2021.12.13 24:59:59', code: '2132132131', content: '气泡' },
|
||||
{ name: 'AR镀膜', createTime: '2021.10.23 24:59:59', code: '2311212232', content: '气泡' },
|
||||
{ name: '固化', createTime: '2021.09.22 24:59:59', code: '21321321312', content: '气泡' },
|
||||
{ name: '丝网印刷', createTime: '2021.12.21 24:59:59', code: '21321322132', content: '气泡' },
|
||||
{ name: '钢化炉', createTime: '2021.12.20 24:59:59', code: '21321312321', content: '气泡' },
|
||||
{ name: '检测设备', createTime: '2021.12.12 24:59:59', code: '21321322132', content: '气泡' },
|
||||
{ name: '包装设备', createTime: '2021.12.23 24:59:59', code: '39284982931', content: '气泡' }
|
||||
]
|
||||
const legendData1 = [
|
||||
{
|
||||
name: '设备1',
|
||||
icon: 'circle',
|
||||
value: 196
|
||||
},
|
||||
{
|
||||
name: '设备2',
|
||||
icon: 'circle',
|
||||
value: 147
|
||||
},
|
||||
{
|
||||
name: '设备3',
|
||||
icon: 'circle',
|
||||
value: 24
|
||||
},
|
||||
{
|
||||
name: '设备4',
|
||||
icon: 'circle',
|
||||
value: 85
|
||||
},
|
||||
{
|
||||
name: '设备5',
|
||||
icon: 'circle',
|
||||
value: 8
|
||||
},
|
||||
{
|
||||
name: '设备6',
|
||||
icon: 'circle',
|
||||
value: 112
|
||||
},
|
||||
{
|
||||
name: '设备7',
|
||||
icon: 'circle',
|
||||
value: 146
|
||||
},
|
||||
{
|
||||
name: '设备8',
|
||||
icon: 'circle',
|
||||
value: 27
|
||||
},
|
||||
{
|
||||
name: '设备9',
|
||||
icon: 'circle',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: '设备10',
|
||||
icon: 'circle',
|
||||
value: 90
|
||||
}
|
||||
]
|
||||
const legendData2 = [
|
||||
{
|
||||
name: '磨边',
|
||||
icon: 'circle',
|
||||
value: 196
|
||||
},
|
||||
{
|
||||
name: '清洗',
|
||||
icon: 'circle',
|
||||
value: 135
|
||||
},
|
||||
{
|
||||
name: '固化',
|
||||
icon: 'circle',
|
||||
value: 144
|
||||
},
|
||||
{
|
||||
name: '镀膜',
|
||||
icon: 'circle',
|
||||
value: 97
|
||||
},
|
||||
{
|
||||
name: '激光打孔',
|
||||
icon: 'circle',
|
||||
value: 12
|
||||
},
|
||||
{
|
||||
name: '丝网印刷',
|
||||
icon: 'circle',
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
name: '钢化炉',
|
||||
icon: 'circle',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
const legendData3 = [
|
||||
{
|
||||
name: '钢一线',
|
||||
icon: 'circle',
|
||||
value: 196
|
||||
},
|
||||
{
|
||||
name: '钢二线',
|
||||
icon: 'circle',
|
||||
value: 133
|
||||
},
|
||||
{
|
||||
name: '钢三线',
|
||||
icon: 'circle',
|
||||
value: 24
|
||||
},
|
||||
{
|
||||
name: '钢四线',
|
||||
icon: 'circle',
|
||||
value: 77
|
||||
},
|
||||
{
|
||||
name: '钢五线',
|
||||
icon: 'circle',
|
||||
value: 77
|
||||
}
|
||||
]
|
||||
const qualityYearTableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: '设备名称'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '设备编码'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '设备状态',
|
||||
// subcomponent: alarmLevel,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'error',
|
||||
label: '是否故障'
|
||||
}
|
||||
]
|
||||
import WebSocketHeartbeat from './ws.js';
|
||||
|
||||
// 创建WebSocketHeartbeat实例
|
||||
const qualityYearList = [
|
||||
{
|
||||
name: '翻转机', code: 'EQ20240110112358000235', status: '运行', error: '否' },
|
||||
name: '翻转机', code: 'EQ20240110112358000235', status: '运行', error: '否'
|
||||
},
|
||||
{
|
||||
name: '烘干炉', code: 'EQ20240110112537000241', status: '运行', error: '否' },
|
||||
name: '烘干炉', code: 'EQ20240110112537000241', status: '运行', error: '否'
|
||||
},
|
||||
{
|
||||
name: '清洗机', code: ' EQ20240110112310000232', status: '运行', error: '否' },
|
||||
name: '清洗机', code: ' EQ20240110112310000232', status: '运行', error: '否'
|
||||
},
|
||||
{ name: '钢化清洗机', code: 'EQ20240110111700000208', status: '运行', error: '否' },
|
||||
{ name: '固化机', code: 'EQ20240110111700000201', status: '运行', error: '否' },
|
||||
{
|
||||
name: '磨边清洗机', code: ' EQ20240110111700000208', status: '运行', error: '否' },
|
||||
name: '磨边清洗机', code: ' EQ20240110111700000208', status: '运行', error: '否'
|
||||
},
|
||||
{ name: '预热机', code: 'EQ20240110111700000205', status: '故障', error: '是' },
|
||||
{ name: '下片机', code: 'EQ20240115151435000279', status: '运行', error: '否' },
|
||||
{
|
||||
name: '冷却机', code: 'EQ20240110111700000203', status: '运行', error: '否' },
|
||||
name: '冷却机', code: 'EQ20240110111700000203', status: '运行', error: '否'
|
||||
},
|
||||
{
|
||||
name: 'A储片机106', code: 'EQ20240110111700000202', status: '运行', error: '否' },
|
||||
name: 'A储片机106', code: 'EQ20240110111700000202', status: '运行', error: '否'
|
||||
},
|
||||
{ name: '二次清洗机', code: 'EQ20240110111700000209', status: '运行', error: '否' },
|
||||
{
|
||||
name: '二次磨边机', code: ' EQ20240110110927000181', status: '故障', error: '是' },
|
||||
name: '二次磨边机', code: ' EQ20240110110927000181', status: '故障', error: '是'
|
||||
},
|
||||
{ name: '测试设备', code: 'EQ20240110111700000201', status: '运行', error: '否' }
|
||||
|
||||
]
|
||||
const qualityMonthTableProps = [
|
||||
{
|
||||
prop: 'productionLineName',
|
||||
label: '产线名'
|
||||
},
|
||||
{
|
||||
prop: 'sectionName',
|
||||
label: '工序'
|
||||
},
|
||||
{
|
||||
prop: 'count',
|
||||
label: '损耗片数'
|
||||
},
|
||||
{
|
||||
prop: 'inspectionTypeName',
|
||||
label: '缺陷类型'
|
||||
},
|
||||
]
|
||||
const qualityMonthList = [
|
||||
{
|
||||
@ -514,7 +177,7 @@ export default {
|
||||
baseTable1,
|
||||
// baseTable2,
|
||||
// baseTable3,
|
||||
TopRadioGroup,
|
||||
// TopRadioGroup,
|
||||
doubleYChart,
|
||||
LinearBarChart
|
||||
// pieChart1,
|
||||
@ -530,11 +193,8 @@ export default {
|
||||
orderList:[],
|
||||
times: '',
|
||||
EnergyMonitoringNameList: [],
|
||||
equipmentList:[],
|
||||
// equipmentList:[],
|
||||
EnergyMonitoringList: [],
|
||||
// offsetWidth: null,
|
||||
qualityYearTableProps,
|
||||
cxNameList,
|
||||
eqConfig: {
|
||||
header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
@ -557,7 +217,9 @@ export default {
|
||||
// index:true,
|
||||
rowNum: 10
|
||||
},
|
||||
cxDataList,
|
||||
// cxDataList,
|
||||
SJGws: undefined,
|
||||
wsHeartbeat:undefined,
|
||||
productLineList:[],
|
||||
qualityYearList,
|
||||
clientWidth: 0,
|
||||
@ -565,17 +227,10 @@ export default {
|
||||
isFullScreen: false,
|
||||
// orderProcessList: [],
|
||||
orderProcessList,
|
||||
qualityTableProps1,
|
||||
qualityMonthList,
|
||||
qualityMonthTableProps,
|
||||
// qualityMonthTableProps,
|
||||
modelMonth: '',
|
||||
qualityList1,
|
||||
qualityTableProps2,
|
||||
qualityList2,
|
||||
dateType: '0',
|
||||
legendData1,
|
||||
legendData2,
|
||||
legendData3
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -605,10 +260,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.fetchList('exception-alarm')
|
||||
// this.fetchList('inAndOutOfEachLine')
|
||||
// this.fetchList('order-process')
|
||||
// this.fetchList('line-chart-data')
|
||||
this.getData()
|
||||
this.init()
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
@ -646,24 +298,6 @@ export default {
|
||||
this.beilv2 = _this.clientWidth / 1920
|
||||
})()
|
||||
}
|
||||
// const _this = this;
|
||||
// window.onresize = () => {
|
||||
// return (() => {
|
||||
// _this.clientWidth = `${document.documentElement.clientWidth}`
|
||||
// this.beilv2 = _this.clientWidth / 1920
|
||||
// })()
|
||||
// }
|
||||
// this.beilv2 = window.innerWidth / 1920
|
||||
// addEventListener('resize', resizeFun = () => {
|
||||
// this.beilv2 = window.innerWidth / 1920
|
||||
// })
|
||||
// erd.listenTo(document, (element) => {
|
||||
// console.log(element.offsetWidth)
|
||||
// this.beilv2 = element.offsetWidth / 1920
|
||||
|
||||
// // var width = element.offsetWidth;
|
||||
// // var height = element.offsetHeight;
|
||||
// });
|
||||
},
|
||||
// beforeDestroy() {
|
||||
// //离开页面删除检测器和所有侦听器
|
||||
@ -671,6 +305,22 @@ export default {
|
||||
// removeEventListener('resize', resizeFun)
|
||||
// },
|
||||
methods: {
|
||||
getData() {
|
||||
let processArr = qualityMonthList.map((item, index) => [
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||
])
|
||||
this.processConfig.data = processArr
|
||||
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||
},
|
||||
// getList() {
|
||||
// // this.$axios.get(
|
||||
// // 'base/core-production-line/listAll',
|
||||
@ -742,233 +392,226 @@ export default {
|
||||
this.times = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
||||
},
|
||||
initWebSocket() {
|
||||
if (typeof (WebSocket) === 'undefined') {
|
||||
alert('您的浏览器不支持WebSocket')
|
||||
} else {
|
||||
let date = new Date().valueOf()
|
||||
const wsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=EN${date}`
|
||||
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
// const wsUrl = 'ws://10.70.2.2:8080/websocket/message?userId=EN111'
|
||||
// 实例化 WebSocket
|
||||
this.websocket = new WebSocket(wsUrl)
|
||||
// 监听 WebSocket 连接
|
||||
this.websocket.onopen = this.websocketOnOpen
|
||||
// 监听 WebSocket 错误信息
|
||||
this.websocket.onerror = this.websocketOnError
|
||||
// 监听 WebSocket 消息
|
||||
this.websocket.onmessage = this.websocketOnMessage
|
||||
// 监听 webSocket 断开信息
|
||||
this.websocket.onclose = this.websocketClose
|
||||
}
|
||||
let date = new Date().valueOf()
|
||||
const wsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=EN${date}`
|
||||
this.wsHeartbeat = new WebSocketHeartbeat(wsUrl);
|
||||
|
||||
// 处理收到的消息
|
||||
this.wsHeartbeat.ws.onmessage = (event) => {
|
||||
console.log('收到消息:', event.data)
|
||||
this.wsData = event?.data ? JSON.parse(event?.data) : {}
|
||||
// console.log('22222', this.wsData.data)
|
||||
if (this.wsData.type === 'EnergyMonitoring') {
|
||||
let EnergyNameList = []
|
||||
this.wsData.data.forEach((ele) => {
|
||||
EnergyNameList.push(ele.lineName)
|
||||
})
|
||||
this.EnergyMonitoringNameList = EnergyNameList
|
||||
let EnergyDataList = []
|
||||
this.wsData.data.forEach((ele) => {
|
||||
EnergyDataList.push(ele.useQuantity
|
||||
)
|
||||
})
|
||||
this.EnergyMonitoringList = EnergyDataList
|
||||
console.log(EnergyDataList)
|
||||
this.$refs.EnergyMonitoringChart.initChart(this.EnergyMonitoringNameList, this.EnergyMonitoringList)
|
||||
}
|
||||
};
|
||||
// if (typeof (WebSocket) === 'undefined') {
|
||||
// alert('您的浏览器不支持WebSocket')
|
||||
// } else {
|
||||
// const wsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=EN${date}`
|
||||
// // const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
// // const wsUrl = 'ws://10.70.2.2:8080/websocket/message?userId=EN111'
|
||||
// // 实例化 WebSocket
|
||||
// this.websocket = new WebSocket(wsUrl)
|
||||
// // 监听 WebSocket 连接
|
||||
// this.websocket.onopen = this.websocketOnOpen
|
||||
// // 监听 WebSocket 错误信息
|
||||
// this.websocket.onerror = this.websocketOnError
|
||||
// // 监听 WebSocket 消息
|
||||
// this.websocket.onmessage = this.websocketOnMessage
|
||||
// // 监听 webSocket 断开信息
|
||||
// this.websocket.onclose = this.websocketClose
|
||||
// }
|
||||
},
|
||||
SJGInitWebSocket() {
|
||||
if (typeof (WebSocket) === 'undefined') {
|
||||
alert('您的浏览器不支持WebSocket')
|
||||
} else {
|
||||
// const wsUrl = `ws://10.70.2.2:8080/websocket/message?userId=EN${date}`
|
||||
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
let date = new Date().valueOf()
|
||||
// console.log(date);
|
||||
console.log(process.env);
|
||||
const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=SJG${date}`
|
||||
this.SJGWebsocket = new WebSocket(SJGWsUrl)
|
||||
// 监听 WebSocket 连接
|
||||
this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen
|
||||
// 监听 WebSocket 错误信息
|
||||
this.SJGWebsocket.onerror = this.SJGWebsocketOnError
|
||||
// 监听 WebSocket 消息
|
||||
this.SJGWebsocket.onmessage = this.SJGWebsocketOnMessage
|
||||
// 监听 webSocket 断开信息
|
||||
this.SJGWebsocket.onclose = this.SJGWebsocketClose
|
||||
}
|
||||
},
|
||||
SJGWebsocketOnOpen() {
|
||||
console.log('socket连接成功')
|
||||
// console.log(this.SJGWebsocket.onmessage);
|
||||
this.SJGWebsocket.onmessage()
|
||||
},
|
||||
// 连接建立失败重连
|
||||
SJGWebsocketOnError(e) {
|
||||
// console.log('11111', e)
|
||||
this.SJGInitWebSocket()
|
||||
},
|
||||
// 数据接收
|
||||
SJGWebsocketOnMessage(e) {
|
||||
// console.log(1111, e)
|
||||
this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// console.log(this.wsData.detData);
|
||||
// console.log('22222', this.wsData.data)
|
||||
if (this.SJGWsData.type === 'order') {
|
||||
this.orderList = this.SJGWsData.detData.map((ele, index) => {
|
||||
if (ele.progressRate != 1) {
|
||||
return {
|
||||
id: ele.id,
|
||||
name: ele.name,
|
||||
progressRate: ele.progressRate.toFixed(3)
|
||||
}
|
||||
}
|
||||
});
|
||||
console.log(this.orderList)
|
||||
} else if (this.SJGWsData.type === 'equipment') {
|
||||
// this.equipmentList = this.SJGWsData.detData.map((ele, index) => {
|
||||
// // if (ele.progressRate != 1) {
|
||||
// return {
|
||||
// id: ele.id,
|
||||
// name: ele.name,
|
||||
// code: ele.code,
|
||||
// status: ele.status,
|
||||
// error: ele.error=== true ? '是' : '否'
|
||||
// }
|
||||
// // }
|
||||
// });
|
||||
let eqArr = this.SJGWsData.detData.map((item, index) => [
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||
])
|
||||
this.eqConfig.data = eqArr
|
||||
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
||||
// console.log(SJGWsData.orderList)
|
||||
} else if (this.SJGWsData.type === 'productline') {
|
||||
console.log('aaaaaaaaaaaaaaaaaaa', this.SJGWsData);
|
||||
// console.log(this.wsData.detData);
|
||||
let nameList = []
|
||||
let passRateList = []
|
||||
let outputNumList = []
|
||||
let date = new Date().valueOf()
|
||||
const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=SJG${date}`
|
||||
this.SJGws = new WebSocketHeartbeat(SJGWsUrl);
|
||||
|
||||
// console.log('2222222222', this.productLineList);
|
||||
// this.productLineList.forEach((item) => {
|
||||
// 处理收到的消息
|
||||
this.SJGws.ws.onmessage = (event) => {
|
||||
console.log('收到消息:', event.data)
|
||||
this.SJGWsData = event?.data ? JSON.parse(event?.data) : {}
|
||||
// console.log(this.wsData.detData);
|
||||
// console.log('22222', this.wsData.data)
|
||||
if (this.SJGWsData.type === 'order') {
|
||||
this.orderList = this.SJGWsData.detData.map((ele, index) => {
|
||||
if (ele.progressRate && ele.progressRate != 1) {
|
||||
return {
|
||||
id: ele.id,
|
||||
name: ele.name,
|
||||
progressRate: ele.progressRate.toFixed(3)
|
||||
}
|
||||
}
|
||||
});
|
||||
console.log(this.orderList)
|
||||
} else if (this.SJGWsData.type === 'equipment') {
|
||||
let eqArr = this.SJGWsData.detData.map((item, index) => [
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||
])
|
||||
this.eqConfig.data = eqArr
|
||||
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
||||
// console.log(SJGWsData.orderList)
|
||||
} else if (this.SJGWsData.type === 'productline') {
|
||||
console.log('aaaaaaaaaaaaaaaaaaa', this.SJGWsData);
|
||||
let nameList = []
|
||||
let passRateList = []
|
||||
let outputNumList = []
|
||||
this.SJGWsData.detData.forEach((ele) => {
|
||||
// if (item.id == ele.productionLineId) {
|
||||
// if (item.name.substr(0, 1) == "D") {
|
||||
// console.log(ele)
|
||||
nameList.push(ele.lineName)
|
||||
outputNumList.push(ele.outputNum)
|
||||
passRateList.push(ele.passRate)
|
||||
// }
|
||||
// if (item.name.substr(0, 1) == "D") {
|
||||
// console.log(ele)
|
||||
nameList.push(ele.lineName)
|
||||
outputNumList.push(ele.outputNum)
|
||||
passRateList.push(ele.passRate)
|
||||
// }
|
||||
// }
|
||||
})
|
||||
// })
|
||||
// progressRateList = EnergyNameList
|
||||
// let EnergyDataList = []
|
||||
// this.SJGWsData.detData.forEach((ele) => {
|
||||
// })
|
||||
// this.SJGWsData.detData.forEach((ele) => {
|
||||
// })
|
||||
// console.log(this.EnergyMonitoringNameList)
|
||||
// console.log(this.EnergyMonitoringList)
|
||||
// this.$nextTick(() => {
|
||||
this.$refs.productLineChart.initChart(nameList, passRateList, outputNumList)
|
||||
} else if (this.SJGInitWebSocket === 'inspection') {
|
||||
let processArr = qualityMonthList.map((item, index) => [
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||
])
|
||||
this.processConfig.data = processArr
|
||||
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||
}
|
||||
this.$refs.productLineChart.initChart(nameList, passRateList, outputNumList)
|
||||
} else if (this.SJGInitWebSocket === 'inspection') {
|
||||
}
|
||||
};
|
||||
// if (typeof (WebSocket) === 'undefined') {
|
||||
// alert('您的浏览器不支持WebSocket')
|
||||
// } else {
|
||||
// let date = new Date().valueOf()
|
||||
// // console.log(date);
|
||||
// console.log(process.env);
|
||||
// const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=SJG${date}`
|
||||
// this.SJGWebsocket = new WebSocket(SJGWsUrl)
|
||||
// // 监听 WebSocket 连接
|
||||
// this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen
|
||||
// // 监听 WebSocket 错误信息
|
||||
// this.SJGWebsocket.onerror = this.SJGWebsocketOnError
|
||||
// // 监听 WebSocket 消息
|
||||
// this.SJGWebsocket.onmessage = this.SJGWebsocketOnMessage
|
||||
// // 监听 webSocket 断开信息
|
||||
// this.SJGWebsocket.onclose = this.SJGWebsocketClose
|
||||
// }
|
||||
},
|
||||
// SJGWebsocketOnOpen() {
|
||||
// console.log('socket连接成功')
|
||||
// // console.log(this.SJGWebsocket.onmessage);
|
||||
// this.SJGWebsocket.onmessage()
|
||||
// },
|
||||
// // 连接建立失败重连
|
||||
// SJGWebsocketOnError(e) {
|
||||
// // console.log('11111', e)
|
||||
// this.SJGInitWebSocket()
|
||||
// },
|
||||
// 数据接收
|
||||
// SJGWebsocketOnMessage(e) {
|
||||
// console.log(1111, e)
|
||||
// this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// // console.log(this.wsData.detData);
|
||||
// // console.log('22222', this.wsData.data)
|
||||
// if (this.SJGWsData.type === 'order') {
|
||||
// this.orderList = this.SJGWsData.detData.map((ele, index) => {
|
||||
// if (ele.progressRate != 1) {
|
||||
// return {
|
||||
// id: ele.id,
|
||||
// name: ele.name,
|
||||
// progressRate: ele.progressRate.toFixed(3)
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// console.log(this.orderList)
|
||||
// } else if (this.SJGWsData.type === 'equipment') {
|
||||
// let eqArr = this.SJGWsData.detData.map((item, index) => [
|
||||
// `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
// </span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||
// </span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||
// ])
|
||||
// this.eqConfig.data = eqArr
|
||||
// this.$refs['eqScrollBoard'].updateRows(eqArr)
|
||||
// // console.log(SJGWsData.orderList)
|
||||
// } else if (this.SJGWsData.type === 'productline') {
|
||||
// console.log('aaaaaaaaaaaaaaaaaaa', this.SJGWsData);
|
||||
// let nameList = []
|
||||
// let passRateList = []
|
||||
// let outputNumList = []
|
||||
// this.SJGWsData.detData.forEach((ele) => {
|
||||
// // if (item.id == ele.productionLineId) {
|
||||
// // if (item.name.substr(0, 1) == "D") {
|
||||
// // console.log(ele)
|
||||
// nameList.push(ele.lineName)
|
||||
// outputNumList.push(ele.outputNum)
|
||||
// passRateList.push(ele.passRate)
|
||||
// // }
|
||||
// // }
|
||||
// })
|
||||
// this.$refs.productLineChart.initChart(nameList, passRateList, outputNumList)
|
||||
// } else if (this.SJGInitWebSocket === 'inspection') {
|
||||
// }
|
||||
// },
|
||||
SJGWebsocketClose(e) {
|
||||
this.SJGws.ws.onclose = (event) => { console.log(event); }
|
||||
},
|
||||
// // 连接建立之后执行send方法发送数据
|
||||
// websocketOnOpen() {
|
||||
// console.log('socket连接成功')
|
||||
// this.websocket.onmessage()
|
||||
// },
|
||||
// 连接建立失败重连
|
||||
// websocketOnError(e) {
|
||||
// console.log('11111', e)
|
||||
// this.initWebSocket()
|
||||
// },
|
||||
// 数据接收
|
||||
// websocketOnMessage(e) {
|
||||
// // console.log(1111, e)
|
||||
// this.wsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// // console.log('22222', this.wsData.data)
|
||||
// if (this.wsData.type === 'EnergyMonitoring') {
|
||||
// let EnergyNameList = []
|
||||
// this.wsData.data.forEach((ele) => {
|
||||
// EnergyNameList.push(ele.lineName)
|
||||
// })
|
||||
// this.EnergyMonitoringNameList = EnergyNameList
|
||||
// let EnergyDataList = []
|
||||
// this.wsData.data.forEach((ele) => {
|
||||
// EnergyDataList.push(ele.useQuantity
|
||||
// )
|
||||
// })
|
||||
// this.EnergyMonitoringList = EnergyDataList
|
||||
// console.log(EnergyDataList)
|
||||
// this.$refs.EnergyMonitoringChart.initChart(this.EnergyMonitoringNameList, this.EnergyMonitoringList)
|
||||
// }
|
||||
// },
|
||||
// 数据发送
|
||||
// SJGWebsocketSend() {
|
||||
// websocketSend() {
|
||||
// this.websocket.send('11111')
|
||||
// },
|
||||
// // 关闭
|
||||
SJGWebsocketClose(e) {
|
||||
console.log('WebSocket 断开连接', e)
|
||||
},
|
||||
// // 连接建立之后执行send方法发送数据
|
||||
websocketOnOpen() {
|
||||
console.log('socket连接成功')
|
||||
this.websocket.onmessage()
|
||||
},
|
||||
// 连接建立失败重连
|
||||
websocketOnError(e) {
|
||||
console.log('11111', e)
|
||||
this.initWebSocket()
|
||||
},
|
||||
// 数据接收
|
||||
websocketOnMessage(e) {
|
||||
// console.log(1111, e)
|
||||
this.wsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// console.log('22222', this.wsData.data)
|
||||
if (this.wsData.type === 'EnergyMonitoring') {
|
||||
let EnergyNameList = []
|
||||
this.wsData.data.forEach((ele) => {
|
||||
EnergyNameList.push(ele.lineName)
|
||||
})
|
||||
this.EnergyMonitoringNameList = EnergyNameList
|
||||
let EnergyDataList = []
|
||||
this.wsData.data.forEach((ele) => {
|
||||
EnergyDataList.push(ele.useQuantity
|
||||
// {
|
||||
// type: 'bar',
|
||||
// data: ele.useQuantity,
|
||||
// barWidth: 6
|
||||
|
||||
// }
|
||||
)
|
||||
})
|
||||
this.EnergyMonitoringList = EnergyDataList
|
||||
console.log(EnergyDataList)
|
||||
// console.log(this.EnergyMonitoringNameList)
|
||||
// console.log(this.EnergyMonitoringList)
|
||||
// this.$nextTick(() => {
|
||||
this.$refs.EnergyMonitoringChart.initChart(this.EnergyMonitoringNameList, this.EnergyMonitoringList)
|
||||
// })
|
||||
}
|
||||
},
|
||||
// 数据发送
|
||||
websocketSend() {
|
||||
this.websocket.send('11111')
|
||||
},
|
||||
// 关闭
|
||||
websocketClose(e) {
|
||||
// console.log('WebSocket 断开连接', e)
|
||||
this.wsHeartbeat.ws.onclose = (event) => { console.log(event); }
|
||||
},
|
||||
windowWidth(value) {
|
||||
this.clientWidth = value
|
||||
this.beilv2 = this.clientWidth / 1920
|
||||
},
|
||||
// fetchList(type) {
|
||||
// switch (type) {
|
||||
// case 'order-process':
|
||||
// return axios({
|
||||
// url: '/analysis/factory-monitor/order',
|
||||
// method: 'post'
|
||||
// }).then(res => {
|
||||
// if (res.data) {
|
||||
// this.orderProcessList = res.data
|
||||
// // this.orderProcessList = [
|
||||
// // { id: 1, name: '订单1', outRate: 0.5 },
|
||||
// // { id: 2, name: '订单2', outRate: 0.54 },
|
||||
// // { id: 3, name: '订单3', outRate: 0.45 },
|
||||
// // { id: 4, name: '订单4', outRate: 0.65 },
|
||||
// // { id: 5, name: '订单5', outRate: 0.35 },
|
||||
// // { id: 6, name: '订单6', outRate: 0.15 },
|
||||
// // { id: 7, name: '订单7', outRate: 0.5 },
|
||||
// // { id: 8, name: '订单8', outRate: 0.5 }
|
||||
// // ]
|
||||
// } else {
|
||||
// this.orderProcessList.splice(0)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
change() {
|
||||
this.isFullScreen = screenfull.isFullscreen
|
||||
},
|
||||
|
@ -1,99 +0,0 @@
|
||||
@import './variables.scss';
|
||||
|
||||
@mixin colorBtn($color) {
|
||||
background: $color;
|
||||
|
||||
&:hover {
|
||||
color: $color;
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
background: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.blue-btn {
|
||||
@include colorBtn($blue)
|
||||
}
|
||||
|
||||
.light-blue-btn {
|
||||
@include colorBtn($light-blue)
|
||||
}
|
||||
|
||||
.red-btn {
|
||||
@include colorBtn($red)
|
||||
}
|
||||
|
||||
.pink-btn {
|
||||
@include colorBtn($pink)
|
||||
}
|
||||
|
||||
.green-btn {
|
||||
@include colorBtn($green)
|
||||
}
|
||||
|
||||
.tiffany-btn {
|
||||
@include colorBtn($tiffany)
|
||||
}
|
||||
|
||||
.yellow-btn {
|
||||
@include colorBtn($yellow)
|
||||
}
|
||||
|
||||
.pan-btn {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
padding: 14px 36px;
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
outline: none;
|
||||
transition: 600ms ease all;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
&:hover {
|
||||
background: #fff;
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
width: 100%;
|
||||
transition: 600ms ease all;
|
||||
}
|
||||
}
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
width: 0;
|
||||
transition: 400ms ease all;
|
||||
}
|
||||
|
||||
&::after {
|
||||
right: inherit;
|
||||
top: inherit;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-button {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
color: #fff;
|
||||
-webkit-appearance: none;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
outline: 0;
|
||||
margin: 0;
|
||||
padding: 10px 15px;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
}
|
@ -1,173 +0,0 @@
|
||||
// cover some element-ui styles
|
||||
|
||||
.el-breadcrumb__inner,
|
||||
.el-breadcrumb__inner a {
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
||||
.el-upload {
|
||||
input[type="file"] {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.el-upload__input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cell {
|
||||
.el-tag {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.visual-container {
|
||||
.el-table {
|
||||
.cell {
|
||||
line-height: 1.2em !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.app-container {
|
||||
.el-table th>.cell {
|
||||
color: rgb(0, 0, 0,0.85);
|
||||
}
|
||||
.el-table__body tr.current-row>td {
|
||||
background-color: #EAF1FC;
|
||||
}
|
||||
|
||||
}
|
||||
.el-table--medium th, .el-table--medium td {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
::v-deep .el-table__fixed-right {
|
||||
right: 0 !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
.el-button--mini {
|
||||
padding: 4px 0;
|
||||
}
|
||||
.small-padding {
|
||||
.cell {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.fixed-width {
|
||||
.el-button--mini {
|
||||
padding: 7px 10px;
|
||||
min-width: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
.status-col {
|
||||
.cell {
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-button--primary {
|
||||
background-color: #0B58FF !important;
|
||||
border-color: #0B58FF !important;
|
||||
}
|
||||
// to fixed https://github.com/ElemeFE/element/issues/2461
|
||||
.el-dialog {
|
||||
transform: none;
|
||||
left: 0;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.el-dialog__header {
|
||||
padding: 12px 24px 8px;
|
||||
border-bottom: 1px solid #E9E9E9;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.el-dialog__title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.el-dialog__headerbtn {
|
||||
top: 16px;
|
||||
right: 24px;
|
||||
}
|
||||
|
||||
.el-form-item--medium .el-form-item__label {
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.el-button--medium {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-switch.is-checked .el-switch__core {
|
||||
background-color: #0B58FF;
|
||||
border-color: #0B58FF;
|
||||
}
|
||||
|
||||
.el-radio__input.is-checked .el-radio__inner {
|
||||
background-color: #0B58FF;
|
||||
border-color: #0B58FF;
|
||||
}
|
||||
|
||||
.el-button--text{
|
||||
color:#0B58FF;
|
||||
}
|
||||
|
||||
.el-tabs__item.is-active {
|
||||
color: #0b58ff;
|
||||
}
|
||||
|
||||
.el-tooltip__popper.is-dark {
|
||||
max-width: 1100px;
|
||||
}
|
||||
// refine element ui upload
|
||||
.upload-container {
|
||||
.el-upload {
|
||||
width: 100%;
|
||||
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dropdown
|
||||
.el-dropdown-menu {
|
||||
a {
|
||||
display: block
|
||||
}
|
||||
}
|
||||
|
||||
// fix date-picker ui bug in filter-item
|
||||
.el-range-editor.el-input__inner {
|
||||
display: inline-flex !important;
|
||||
}
|
||||
|
||||
// to fix el-date-picker css style
|
||||
.el-range-separator {
|
||||
box-sizing: content-box;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
/**
|
||||
* I think element-ui's default theme color is too light for long-term use.
|
||||
* So I modified the default color and you can modify it to your liking.
|
||||
**/
|
||||
|
||||
/* theme color */
|
||||
$--color-primary: #1890ff;
|
||||
$--color-success: #13ce66;
|
||||
$--color-warning: #ffba00;
|
||||
$--color-danger: #ff4949;
|
||||
// $--color-info: #1E1E1E;
|
||||
|
||||
$--button-font-weight: 400;
|
||||
|
||||
// $--color-text-regular: #1f2d3d;
|
||||
|
||||
$--border-color-light: #dfe4ed;
|
||||
$--border-color-lighter: #e6ebf5;
|
||||
|
||||
$--table-border: 1px solid #dfe6ec;
|
||||
|
||||
/* icon font path, required */
|
||||
$--font-path: "~element-ui/lib/theme-chalk/fonts";
|
||||
|
||||
@import "~element-ui/packages/theme-chalk/src/index";
|
||||
|
||||
// the :export directive is the magic sauce for webpack
|
||||
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
||||
:export {
|
||||
theme: $--color-primary;
|
||||
}
|
@ -1,319 +0,0 @@
|
||||
@import './variables.scss';
|
||||
@import './mixin.scss';
|
||||
@import './transition.scss';
|
||||
@import './element-ui.scss';
|
||||
@import './sidebar.scss';
|
||||
@import './btn.scss';
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
.no-padding {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.padding-content {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
a:focus,
|
||||
a:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a,
|
||||
a:focus,
|
||||
a:hover {
|
||||
cursor: pointer;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.fr {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.fl {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.pr-5 {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.pl-5 {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.inlineBlock {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
&:after {
|
||||
visibility: hidden;
|
||||
display: block;
|
||||
font-size: 0;
|
||||
content: " ";
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
aside {
|
||||
background: #eef1f6;
|
||||
padding: 8px 24px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 2px;
|
||||
display: block;
|
||||
line-height: 32px;
|
||||
font-size: 16px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||
color: #2c3e50;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
a {
|
||||
color: #337ab7;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: rgb(32, 160, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//main-container全局样式
|
||||
.app-container {
|
||||
margin:0 16px 0;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 16px 16px 0;
|
||||
height: calc(100vh - 134px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.components-container {
|
||||
margin: 30px 50px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
// 覆盖原有的分页样式-start
|
||||
|
||||
.el-pagination {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-pagination.is-background .btn-prev,.el-pagination.is-background .btn-next,.el-pagination.is-background .el-pager li {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.el-pagination__jump {
|
||||
margin-left: 125px;
|
||||
}
|
||||
|
||||
.el-pagination__sizes {
|
||||
position: absolute;
|
||||
right: 100px;
|
||||
}
|
||||
|
||||
.el-pagination.is-background .el-pager li:not(.disabled).active {
|
||||
background-color: #0B58FF;
|
||||
}
|
||||
.el-pagination .el-select .el-input .el-input__inner {
|
||||
height: 22px;
|
||||
}
|
||||
.el-badge__content {
|
||||
border: none;
|
||||
}
|
||||
// 覆盖原有的分页样式-end
|
||||
|
||||
.text-center {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.sub-navbar {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
padding-right: 20px;
|
||||
transition: 600ms ease position;
|
||||
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
|
||||
|
||||
.subtitle {
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&.draft {
|
||||
background: #d0d0d0;
|
||||
}
|
||||
|
||||
&.deleted {
|
||||
background: #d0d0d0;
|
||||
}
|
||||
}
|
||||
|
||||
.link-type,
|
||||
.link-type:focus {
|
||||
color: #337ab7;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: rgb(32, 160, 255);
|
||||
}
|
||||
}
|
||||
|
||||
.filter-container {
|
||||
padding-bottom: 10px;
|
||||
|
||||
.filter-item {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
//refine vue-multiselect plugin
|
||||
.multiselect {
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.multiselect--active {
|
||||
z-index: 1000 !important;
|
||||
}
|
||||
|
||||
// 业务代码中
|
||||
.content-row {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
width: 1000px;
|
||||
}
|
||||
.el-dialog__body {
|
||||
padding: 30px 40px;
|
||||
}
|
||||
|
||||
.el-dialog__wrapper {
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track-piece {
|
||||
background-color:rgba(144,147,153,0);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color:rgba(144,147,153,0);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
width: 6px;
|
||||
background: rgba(144,147,153,0);
|
||||
-webkit-border-radius: 2em;
|
||||
-moz-border-radius: 2em;
|
||||
border-radius: 2em;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(144,147,153,.5);
|
||||
background-clip: padding-box;
|
||||
min-height: 28px;
|
||||
-webkit-border-radius: 2em;
|
||||
-moz-border-radius: 2em;
|
||||
border-radius: 2em;
|
||||
transition: background-color .3s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: rgba(144,147,153,.3);
|
||||
}
|
||||
|
||||
// 数据分析单选框样式覆盖
|
||||
|
||||
.app-container{
|
||||
.data-analysis-radio{
|
||||
.el-radio-button__inner {
|
||||
border: 0;
|
||||
padding: 7px 0;
|
||||
margin: 0 15px;
|
||||
}
|
||||
.el-radio-button__orig-radio:checked+.el-radio-button__inner{
|
||||
background-color: transparent;
|
||||
color: #606266;
|
||||
box-shadow: 0 0 0 0 transparent;
|
||||
border-bottom: 2px solid #0B58FF;
|
||||
}
|
||||
.el-radio-button:first-child .el-radio-button__inner,
|
||||
.el-radio-button:last-child .el-radio-button__inner {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-table--group, .el-table--border {
|
||||
border: none;
|
||||
}
|
||||
|
||||
// 全局loading样式覆盖
|
||||
.el-loading-mask{
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
|
||||
input::-webkit-input-placeholder {
|
||||
/* WebKit browsers */
|
||||
font-size:12px;
|
||||
}
|
||||
input::-moz-placeholder {
|
||||
/* Mozilla Firefox 19+ */
|
||||
font-size:12px;
|
||||
}
|
||||
input:-ms-input-placeholder {
|
||||
font-size:12px;
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
@mixin clearfix {
|
||||
&:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin scrollBar {
|
||||
&::-webkit-scrollbar-track-piece {
|
||||
background: #d3dce6;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #99a9bf;
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin relative {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@mixin pct($pct) {
|
||||
width: #{$pct};
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@mixin triangle($width, $height, $color, $direction) {
|
||||
$width: $width/2;
|
||||
$color-border-style: $height solid $color;
|
||||
$transparent-border-style: $width solid transparent;
|
||||
height: 0;
|
||||
width: 0;
|
||||
|
||||
@if $direction==up {
|
||||
border-bottom: $color-border-style;
|
||||
border-left: $transparent-border-style;
|
||||
border-right: $transparent-border-style;
|
||||
}
|
||||
|
||||
@else if $direction==right {
|
||||
border-left: $color-border-style;
|
||||
border-top: $transparent-border-style;
|
||||
border-bottom: $transparent-border-style;
|
||||
}
|
||||
|
||||
@else if $direction==down {
|
||||
border-top: $color-border-style;
|
||||
border-left: $transparent-border-style;
|
||||
border-right: $transparent-border-style;
|
||||
}
|
||||
|
||||
@else if $direction==left {
|
||||
border-right: $color-border-style;
|
||||
border-top: $transparent-border-style;
|
||||
border-bottom: $transparent-border-style;
|
||||
}
|
||||
}
|
@ -1,209 +0,0 @@
|
||||
#app {
|
||||
|
||||
.main-container {
|
||||
min-height: 100%;
|
||||
transition: margin-left .28s;
|
||||
// margin-left: $sideBarWidth;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sidebar-container {
|
||||
transition: width 0.28s;
|
||||
// width: $sideBarWidth !important;
|
||||
// background-color: $menuBg;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
font-size: 0px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1001;
|
||||
overflow: hidden;
|
||||
|
||||
// reset element-ui css
|
||||
.horizontal-collapse-transition {
|
||||
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
|
||||
}
|
||||
|
||||
.scrollbar-wrapper {
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
||||
.el-scrollbar__bar.is-vertical {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
.el-scrollbar {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&.has-logo {
|
||||
.el-scrollbar {
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
|
||||
.is-horizontal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.svg-icon {
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.el-menu {
|
||||
border: none;
|
||||
height: 100%;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
// menu hover
|
||||
.submenu-title-noDropdown,
|
||||
.el-submenu__title {
|
||||
&:hover {
|
||||
// background-color: $menuHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
.is-active>.el-submenu__title {
|
||||
// color: $subMenuActiveText !important;
|
||||
}
|
||||
|
||||
& .nest-menu .el-submenu>.el-submenu__title,
|
||||
& .el-submenu .el-menu-item {
|
||||
// min-width: $sideBarWidth !important;
|
||||
// background-color: $subMenuBg !important;
|
||||
|
||||
&:hover {
|
||||
// background-color: $subMenuHover !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hideSidebar {
|
||||
.sidebar-container {
|
||||
width: 54px !important;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
margin-left: 54px;
|
||||
}
|
||||
|
||||
.submenu-title-noDropdown {
|
||||
padding: 0 !important;
|
||||
position: relative;
|
||||
|
||||
.el-tooltip {
|
||||
padding: 0 !important;
|
||||
|
||||
.svg-icon {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-submenu {
|
||||
overflow: hidden;
|
||||
|
||||
&>.el-submenu__title {
|
||||
padding: 0 !important;
|
||||
|
||||
.svg-icon {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.el-submenu__icon-arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-menu--collapse {
|
||||
.el-submenu {
|
||||
&>.el-submenu__title {
|
||||
&>span {
|
||||
height: 0;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-menu--collapse .el-menu .el-submenu {
|
||||
// min-width: $sideBarWidth !important;
|
||||
}
|
||||
|
||||
// mobile responsive
|
||||
.mobile {
|
||||
.main-container {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.sidebar-container {
|
||||
transition: transform .28s;
|
||||
// width: $sideBarWidth !important;
|
||||
}
|
||||
|
||||
&.hideSidebar {
|
||||
.sidebar-container {
|
||||
pointer-events: none;
|
||||
transition-duration: 0.3s;
|
||||
// transform: translate3d(-$sideBarWidth, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.withoutAnimation {
|
||||
|
||||
.main-container,
|
||||
.sidebar-container {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// when menu collapsed
|
||||
.el-menu--vertical {
|
||||
&>.el-menu {
|
||||
.svg-icon {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.nest-menu .el-submenu>.el-submenu__title,
|
||||
.el-menu-item {
|
||||
&:hover {
|
||||
// you can use $subMenuHover
|
||||
// background-color: $menuHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
// the scroll bar appears when the subMenu is too long
|
||||
>.el-menu--popup {
|
||||
max-height: 100vh;
|
||||
overflow-y: auto;
|
||||
|
||||
&::-webkit-scrollbar-track-piece {
|
||||
background: #d3dce6;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #99a9bf;
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
// global transition css
|
||||
|
||||
/* fade */
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.28s;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
.fade-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* fade-transform */
|
||||
.fade-transform-leave-active,
|
||||
.fade-transform-enter-active {
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.fade-transform-enter {
|
||||
opacity: 0;
|
||||
transform: translateX(-30px);
|
||||
}
|
||||
|
||||
.fade-transform-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(30px);
|
||||
}
|
||||
|
||||
/* breadcrumb transition */
|
||||
.breadcrumb-enter-active,
|
||||
.breadcrumb-leave-active {
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.breadcrumb-enter,
|
||||
.breadcrumb-leave-active {
|
||||
opacity: 0;
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
.breadcrumb-move {
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.breadcrumb-leave-active {
|
||||
position: absolute;
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
// base color
|
||||
$blue:#324157;
|
||||
$light-blue:#3A71A8;
|
||||
$red:#C03639;
|
||||
$pink: #E65D6E;
|
||||
$green: #30B08F;
|
||||
$tiffany: #4AB7BD;
|
||||
$yellow:#FEC171;
|
||||
$panGreen: #30B08F;
|
||||
|
||||
// sidebar
|
||||
$menuText:#bfcbd9;
|
||||
$menuActiveText:#409EFF;
|
||||
$subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951
|
||||
|
||||
$menuBg:#304156;
|
||||
$menuHover:#263445;
|
||||
|
||||
$subMenuBg:#0B253F;
|
||||
$subMenuHover:#001528;
|
||||
|
||||
$sideBarWidth: 248px;
|
||||
|
||||
// the :export directive is the magic sauce for webpack
|
||||
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
||||
:export {
|
||||
menuText: $menuText;
|
||||
menuActiveText: $menuActiveText;
|
||||
subMenuActiveText: $subMenuActiveText;
|
||||
// menuBg: $menuBg;
|
||||
menuHover: $menuHover;
|
||||
subMenuBg: $subMenuBg;
|
||||
subMenuHover: $subMenuHover;
|
||||
sideBarWidth: $sideBarWidth;
|
||||
}
|
64
src/views/OperationalOverview/ws.js
Normal file
64
src/views/OperationalOverview/ws.js
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2024-03-26 14:38:14
|
||||
* @LastEditTime: 2024-03-26 15:45:20
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
class WebSocketHeartbeat {
|
||||
constructor(url) {
|
||||
this.url = url;
|
||||
this.ws = null;
|
||||
this.heartBeatTimer = null;
|
||||
this.isReconnecting = false;
|
||||
this.initWebSocket();
|
||||
}
|
||||
|
||||
initWebSocket() {
|
||||
this.ws = new WebSocket(this.url);
|
||||
|
||||
this.ws.onopen = () => {
|
||||
console.log('WebSocket连接已打开');
|
||||
this.startHeartBeat();
|
||||
};
|
||||
|
||||
this.ws.onmessage = (event) => {
|
||||
console.log('收到消息:', event.data);
|
||||
// 在这里处理收到的消息,可以根据具体需求进行处理
|
||||
};
|
||||
|
||||
this.ws.onclose = () => {
|
||||
console.log('WebSocket连接已关闭');
|
||||
this.stopHeartBeat();
|
||||
if (!this.isReconnecting) {
|
||||
this.reconnectWebSocket();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
startHeartBeat() {
|
||||
this.heartBeatTimer = setInterval(() => {
|
||||
if (this.ws.readyState === WebSocket.OPEN) {
|
||||
// this.ws.send('ping');
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
stopHeartBeat() {
|
||||
clearInterval(this.heartBeatTimer);
|
||||
}
|
||||
|
||||
reconnectWebSocket() {
|
||||
this.isReconnecting = true;
|
||||
setTimeout(() => {
|
||||
this.initWebSocket();
|
||||
this.isReconnecting = false;
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
closeWebSocket() {
|
||||
this.ws.close();
|
||||
}
|
||||
}
|
||||
|
||||
export default WebSocketHeartbeat;
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-12-12 16:04:44
|
||||
* @LastEditTime: 2024-03-20 16:20:39
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -130,6 +130,11 @@ export default {
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data;
|
||||
const tempPic = []
|
||||
this.dataForm.files?.forEach(item => {
|
||||
tempPic.push(item.fileUrl)
|
||||
})
|
||||
this.files = tempPic.join(',')
|
||||
if (this.setData) {
|
||||
this.setDataForm()
|
||||
}
|
||||
@ -150,8 +155,8 @@ export default {
|
||||
}
|
||||
|
||||
this.dataForm.files = []
|
||||
if (this.files.length > 0) {
|
||||
this.files.forEach(item => {
|
||||
if (this.files.split(',').length > 0) {
|
||||
this.files.split(',').forEach(item => {
|
||||
const temp = {
|
||||
fileType: 1,
|
||||
fileUrl: item
|
||||
|
@ -387,6 +387,7 @@ export default {
|
||||
label: '设备图片',
|
||||
prop: 'files2',
|
||||
fileType: 1,
|
||||
uploadTips: true
|
||||
},
|
||||
],
|
||||
[{ input: true, label: '备注', prop: 'remark' }],
|
||||
|
@ -161,7 +161,7 @@ export default {
|
||||
{
|
||||
upload: true,
|
||||
label: '上传资料',
|
||||
prop: 'files',
|
||||
prop: 'files'
|
||||
},
|
||||
],
|
||||
[{ input: true, label: '备注', prop: 'remark' }],
|
||||
|
@ -186,8 +186,8 @@ export default {
|
||||
code: '',
|
||||
planProductId: '',
|
||||
specifications: '',
|
||||
planStartTime: '',
|
||||
planFinishTime: '',
|
||||
planStartTime: undefined,
|
||||
planFinishTime: undefined,
|
||||
planAssignQuantity: 0,
|
||||
planQuantity: 0,
|
||||
processFlowId: '',
|
||||
@ -248,7 +248,31 @@ export default {
|
||||
this.dataForm.materialMethod = 1
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.dataForm = {
|
||||
id: undefined,
|
||||
workOrderId: '',
|
||||
name: '',
|
||||
code: '',
|
||||
planProductId: '',
|
||||
specifications: '',
|
||||
planStartTime: undefined,
|
||||
planFinishTime: undefined,
|
||||
planAssignQuantity: 0,
|
||||
planQuantity: 0,
|
||||
processFlowId: '',
|
||||
materialMethod: 1,
|
||||
triggerOrigin: 1,
|
||||
priority: '',
|
||||
productLineIds: [],
|
||||
type: '',
|
||||
workers: '',
|
||||
roomNameDict: '',
|
||||
status: 1
|
||||
}
|
||||
},
|
||||
init(id) {
|
||||
this.reset();
|
||||
this.dataForm.id = id || "";
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
@ -256,6 +280,7 @@ export default {
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
console.log('222', this.dataForm)
|
||||
this.planStartTime = ''
|
||||
this.planFinishTime = ''
|
||||
if (this.dataForm.id) {
|
||||
@ -264,6 +289,12 @@ export default {
|
||||
if (this.dataForm.priority !== undefined) {
|
||||
this.dataForm.priority = String(this.dataForm.priority)
|
||||
}
|
||||
if (this.dataForm.planStartTime === 0) {
|
||||
this.dataForm.planStartTime = undefined
|
||||
}
|
||||
if (this.dataForm.planFinishTime === 0) {
|
||||
this.dataForm.planFinishTime = undefined
|
||||
}
|
||||
if (this.dataForm.roomNameDict !== undefined) {
|
||||
this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
|
||||
}
|
||||
|
@ -2,16 +2,19 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-15 15:34:58
|
||||
* @LastEditTime: 2024-03-22 08:53:20
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
:wrapper-closable="true"
|
||||
class="drawer"
|
||||
size="55%">
|
||||
size="55%"
|
||||
:before-close="beforeClose"
|
||||
@closed="$emit('destroy')"
|
||||
>
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ '分配产量' }}
|
||||
</small-title>
|
||||
@ -52,60 +55,47 @@
|
||||
<el-date-picker
|
||||
v-model="dataForm.finishProduceTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间" />
|
||||
value-format="timestamp"
|
||||
placeholder="选择实际生产完成时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="attr-list">
|
||||
<div v-show="!isdetail" class="attr-list">
|
||||
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号" />
|
||||
<el-table-column prop="orderName" label="订单名称" />
|
||||
<el-table-column prop="orderCode" label="订单编码" />
|
||||
<el-table-column prop="priority" label="优先级" />
|
||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
|
||||
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
|
||||
<el-button
|
||||
type="text"
|
||||
:style="{color:'#0B58FF'}"
|
||||
size="mini"
|
||||
@click="edit(scope.row)"
|
||||
>
|
||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
|
||||
</el-button>
|
||||
</el-tooltip> -->
|
||||
|
||||
<!-- <el-tooltip placement="top" content="删除">
|
||||
<el-button
|
||||
type="text"
|
||||
:style="{color:'#FF5454'}"
|
||||
size="mini"
|
||||
@click="deleteDetail(scope.row)"
|
||||
>
|
||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="table_delete" />
|
||||
</el-button>
|
||||
</el-tooltip> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-form ref="tableForm" :model="form" style="padding: 0">
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
row-key="id"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号" />
|
||||
<el-table-column prop="orderName" label="订单名称" />
|
||||
<el-table-column prop="orderCode" label="订单编码" />
|
||||
<el-table-column prop="priority" label="优先级" />
|
||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
||||
<template slot-scope="scope">
|
||||
<el-form-item prop="planAssignmentQuantity">
|
||||
<el-input v-model.number="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="*实际分配数量">
|
||||
<template slot-scope="scope">
|
||||
<el-form-item :prop="`tableData.${scope.$index}.actualAssignmentQuantity`" :rules="[{ required: true, message: '实际分配数量不能为空', trigger: 'blur' }]">
|
||||
<el-input v-model.number="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</el-form>
|
||||
<pagination
|
||||
v-show="listQuery.total > 0"
|
||||
:total="listQuery.total"
|
||||
@ -134,7 +124,7 @@
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getConOrderList, updateConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder';
|
||||
import { getConOrderList, updateConCoreWOr, updateBatchConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder';
|
||||
import SmallTitle from '../material/SmallTitle';
|
||||
// import { parseTime } from '../../core/mixins/code-filter';
|
||||
// import attrAdd from './attr-add';
|
||||
@ -158,6 +148,10 @@ export default {
|
||||
code: undefined,
|
||||
productId: '',
|
||||
remark: undefined,
|
||||
|
||||
},
|
||||
form: {
|
||||
tableData: []
|
||||
},
|
||||
productList: [],
|
||||
materialAttrList: [],
|
||||
@ -174,26 +168,77 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
beforeClose(done) {
|
||||
// if (this.mode.includes('edit')) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
// console.log('嗨害嗨', this.$refs['table'])
|
||||
console.log('nihc ', this.form.tableData)
|
||||
// this.$refs['tableForm'].validate((valid) => {
|
||||
// if (valid) {
|
||||
// alert('提交成功!');
|
||||
// } else {
|
||||
// alert('表单验证失败!');
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.$refs['tableForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 修改的提交
|
||||
console.log('aaaaaaa', this.form.tableData)
|
||||
// 判断分配数量
|
||||
let num = 0
|
||||
const tempList = this.form.tableData.map((item) => {
|
||||
item.workOrderId = this.dataForm.id
|
||||
num += item.actualAssignmentQuantity
|
||||
return item
|
||||
})
|
||||
if (num <= this.dataForm.actualQuantity) {
|
||||
if (this.dataForm.id) {
|
||||
statusChange({
|
||||
id: this.dataForm.id,
|
||||
status: 4,
|
||||
finishProduceTime: this.dataForm.finishProduceTime,
|
||||
actualQuantity: this.dataForm.actualQuantity
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
|
||||
this.saveData(tempList)
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.$message.error('实际分配数量超过实际生产数量!')
|
||||
}
|
||||
console.log('2111', num, tempList)
|
||||
});
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
statusChange({
|
||||
id: this.dataForm.id,
|
||||
status: 4,
|
||||
finishProduceTime: this.dataForm.finishProduceTime,
|
||||
actualQuantity: this.dataForm.actualQuantity
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
return;
|
||||
}
|
||||
// if (this.dataForm.id) {
|
||||
// statusChange({
|
||||
// id: this.dataForm.id,
|
||||
// status: 4,
|
||||
// finishProduceTime: this.dataForm.finishProduceTime,
|
||||
// actualQuantity: this.dataForm.actualQuantity
|
||||
// }).then(response => {
|
||||
// this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
|
||||
// this.visible = false;
|
||||
// this.$emit("refreshDataList");
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// 添加的提交
|
||||
// this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
@ -209,30 +254,14 @@ export default {
|
||||
edit(row) {
|
||||
row.isEdit = true
|
||||
},
|
||||
saveData(row) {
|
||||
if (row.actualAssignmentQuantity) {
|
||||
if (row.id) {
|
||||
// updateMaterialPBDet({
|
||||
// ...row
|
||||
// }).then((response) => {
|
||||
// this.$modal.msgSuccess('修改成功');
|
||||
// // this.visible = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// return;
|
||||
}
|
||||
// 修改的提交
|
||||
updateConCoreWOr({
|
||||
...row,
|
||||
workOrderId: this.dataForm.id
|
||||
}).then((response) => {
|
||||
this.$modal.msgSuccess('分配成功');
|
||||
// this.visible = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
this.$message.warning('请填写实际分配数量');
|
||||
}
|
||||
saveData(list) {
|
||||
console.log('你好', list)
|
||||
// 修改的提交
|
||||
updateBatchConCoreWOr(list).then((response) => {
|
||||
this.$modal.msgSuccess('分配成功');
|
||||
// this.visible = false;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
// 获取工单分配详细列表
|
||||
@ -245,6 +274,7 @@ export default {
|
||||
item.isallocation = item.actualAssignmentQuantity ? true : false
|
||||
return item
|
||||
});
|
||||
this.$set(this.form, 'tableData', this.tableData)
|
||||
this.listQuery.total = response.data.length;
|
||||
});
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-15 15:40:24
|
||||
* @LastEditTime: 2024-03-21 16:52:46
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -16,7 +16,13 @@
|
||||
<!-- <small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title> -->
|
||||
<div v-show="workOrderButton.length" class="buttonDiv">
|
||||
<div v-show="workOrderButton.length" style="position: relative;padding-right: 90px;">
|
||||
<topTabVue :orderIdList='workOrderButton' :orderId="workorderId" @emitFun='toggleName' />
|
||||
<el-button type="primary" plain size="small"
|
||||
style="position: absolute;right: 0; top: 0;height: 48px;font-size: 14px;" @click="goback"><svg-icon
|
||||
icon-class="return" /> 返回</el-button>
|
||||
</div>
|
||||
<!-- <div v-show="workOrderButton.length" class="buttonDiv">
|
||||
<div style="display: flex; width: 100%;">
|
||||
<el-button v-show="showScroll" type="text" style="width: 30px; background: white; margin-right: 8px" @click="scrollLeft" icon="el-icon-caret-left"></el-button>
|
||||
<div ref="content" class="scrollDiv">
|
||||
@ -27,7 +33,7 @@
|
||||
<svg-icon icon-class="return"/>返回
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="content">
|
||||
<div class="card">
|
||||
<div class="boxTitle">
|
||||
@ -157,7 +163,7 @@
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">废片数量</div>
|
||||
<div class="lightTip">{{ dataForm.nokQuantity }}</div>
|
||||
<div class="lightTip">{{ dataForm.nokNum }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">检测瑕疵数</div>
|
||||
@ -222,12 +228,13 @@
|
||||
|
||||
<script>
|
||||
// import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getCoreWO, getCoreWOMaPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
|
||||
import { getCoreWO, getCoreWOMaPage, getlistByProductId, getlistByFlowId, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
|
||||
// import { orderList } from "@/api/base/orderManage";
|
||||
import { getProcessFlowList } from '@/api/base/orderManage'
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { publicFormatter } from "@/utils/dict";
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import topTabVue from '../../order/base/orderManage/components/topTab.vue';
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
@ -265,9 +272,9 @@ const tableProps = [
|
||||
|
||||
const tableProps1 = [
|
||||
{
|
||||
prop: 'material',
|
||||
label: '物料名称',
|
||||
filter: publicFormatter('material')
|
||||
prop: 'materialName',
|
||||
label: '物料名称'
|
||||
// filter: publicFormatter('material')
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
@ -285,7 +292,7 @@ const tableProps1 = [
|
||||
];
|
||||
|
||||
export default {
|
||||
components: { SmallTitle },
|
||||
components: { SmallTitle, topTabVue },
|
||||
data() {
|
||||
return {
|
||||
tableBtn,
|
||||
@ -308,6 +315,7 @@ export default {
|
||||
dataForm: {},
|
||||
orderList: [],
|
||||
materialList: [],
|
||||
workorderId: '',
|
||||
// orderArray: [],
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
@ -331,13 +339,15 @@ export default {
|
||||
name: work.name
|
||||
}
|
||||
})
|
||||
const contentRef = this.$refs.content
|
||||
if (contentRef.scrollWidth > contentRef.clientWidth) {
|
||||
this.showScroll = true
|
||||
} else {
|
||||
this.showScroll = false
|
||||
}
|
||||
console.log(contentRef.scrollWidth, contentRef.clientWidth)
|
||||
this.workorderId = this.workOrderButton[0].id
|
||||
console.log('wawa ew', this.workorderId, this.workOrderButton)
|
||||
// const contentRef = this.$refs.content
|
||||
// if (contentRef.scrollWidth > contentRef.clientWidth) {
|
||||
// this.showScroll = true
|
||||
// } else {
|
||||
// this.showScroll = false
|
||||
// }
|
||||
// console.log(contentRef.scrollWidth, contentRef.clientWidth)
|
||||
this.init(this.workOrderButton[0].id, true)
|
||||
})
|
||||
} else {
|
||||
@ -345,6 +355,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 切换tab获取订单详情
|
||||
toggleName(val) {
|
||||
this.workorderId = val
|
||||
this.init(val, true)
|
||||
},
|
||||
scrolRight() {
|
||||
// let contentRef = this.$refs.content
|
||||
// console.log('你好啊啊', contentRef.scrollWidth, contentRef.clientWidth)
|
||||
@ -442,17 +457,38 @@ export default {
|
||||
// 获取预使用原料列表
|
||||
console.log()
|
||||
if (this.dataForm.id) {
|
||||
getCoreWOMaPage({
|
||||
workOrderId: this.dataForm.id,
|
||||
pageNo: 1,
|
||||
pageSize: 100
|
||||
}).then((response) => {
|
||||
this.materialList = response.data.records.map((item) => {
|
||||
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
|
||||
return item
|
||||
if (this.dataForm.materialMethod === 1) {
|
||||
// 产品
|
||||
getlistByProductId({
|
||||
id: this.dataForm.planProductId
|
||||
}).then((response) => {
|
||||
this.materialList = response.data.map((item) => {
|
||||
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
|
||||
return item
|
||||
});
|
||||
});
|
||||
// this.listQuery.total = response.data.length;
|
||||
});
|
||||
} else {
|
||||
// 工艺流程
|
||||
getlistByFlowId({
|
||||
id: this.dataForm.processFlowId
|
||||
}).then((response) => {
|
||||
this.materialList = response.data.map((item) => {
|
||||
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
|
||||
return item
|
||||
});
|
||||
});
|
||||
}
|
||||
// getCoreWOMaPage({
|
||||
// workOrderId: this.dataForm.id,
|
||||
// pageNo: 1,
|
||||
// pageSize: 100
|
||||
// }).then((response) => {
|
||||
// this.materialList = response.data.records.map((item) => {
|
||||
// item.remaining = item?.num * this.dataForm.remainingQuantity || 0
|
||||
// return item
|
||||
// });
|
||||
// // this.listQuery.total = response.data.length;
|
||||
// });
|
||||
}
|
||||
// 获取订单相关信息
|
||||
// orderList({
|
||||
|
@ -43,7 +43,8 @@
|
||||
<allocation
|
||||
v-if="allocationVisible"
|
||||
ref="allocation"
|
||||
@refreshDataList="getDataList" />
|
||||
@refreshDataList="searchStatus"
|
||||
@destroy="allocationVisible = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -353,6 +354,11 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
searchStatus() {
|
||||
setTimeout(() => {
|
||||
this.getDataList()
|
||||
}, 20000)
|
||||
},
|
||||
getWorkOrder() {
|
||||
getCoreWOList().then(res => {
|
||||
this.formConfig[0].selectOptions = res.data.map(item => {
|
||||
@ -444,7 +450,7 @@ export default {
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
this.searchStatus();
|
||||
// 分配产量
|
||||
// if (param.status === 4) {
|
||||
// this.allocationOrder(param);
|
||||
@ -478,7 +484,7 @@ export default {
|
||||
// 有绑定订单带id
|
||||
this.$refs.allocation.init(val.id);
|
||||
} else {
|
||||
this.$refs.allocation.init();
|
||||
this.$refs.allocation.init(val.id, true);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
@ -2,14 +2,15 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-02-21 09:41:39
|
||||
* @LastEditTime: 2024-03-21 15:21:32
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="isdetail"
|
||||
:wrapper-closable="true"
|
||||
:before-close="beforeClose"
|
||||
class="drawer"
|
||||
size="60%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
@ -256,6 +257,17 @@ export default {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
beforeClose(done) {
|
||||
if (!this.isdetail) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
},
|
||||
async getDict() {
|
||||
// 物料类型列表
|
||||
// const res = await listData({
|
||||
|
@ -2,14 +2,15 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-27 19:50:36
|
||||
* @LastEditTime: 2024-03-21 14:39:52
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="isdetail"
|
||||
:wrapper-closable="true"
|
||||
:before-close="beforeClose"
|
||||
class="drawer"
|
||||
size="70%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
@ -196,6 +197,17 @@ export default {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
beforeClose(done) {
|
||||
if (!this.isdetail) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
},
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.deleteDetail(raw.data);
|
||||
@ -246,7 +258,7 @@ export default {
|
||||
});
|
||||
},
|
||||
initData() {
|
||||
// this.materialAttrList.splice(0);
|
||||
this.tableData.splice(0);
|
||||
this.listQuery.total = 0;
|
||||
},
|
||||
deleteDetail(raw) {
|
||||
@ -284,18 +296,18 @@ export default {
|
||||
});
|
||||
},
|
||||
// 构造一行
|
||||
addRow() {
|
||||
const row = {
|
||||
bomId: this.dataForm.id,
|
||||
materialId: '',
|
||||
num: 0,
|
||||
materialCode: undefined,
|
||||
unit: undefined,
|
||||
remark: '',
|
||||
isEdit: true
|
||||
}
|
||||
this.tableData.push(row)
|
||||
},
|
||||
// addRow() {
|
||||
// const row = {
|
||||
// bomId: this.dataForm.id,
|
||||
// materialId: '',
|
||||
// num: 0,
|
||||
// materialCode: undefined,
|
||||
// unit: undefined,
|
||||
// remark: '',
|
||||
// isEdit: true
|
||||
// }
|
||||
// this.tableData.push(row)
|
||||
// },
|
||||
init(id, isdetail) {
|
||||
this.initData();
|
||||
this.isdetail = isdetail || false;
|
||||
|
@ -17,6 +17,7 @@
|
||||
:table-props="tableProps"
|
||||
:table-data="tableData"
|
||||
@emitFun="handleEmitFun"
|
||||
:max-height="tableH"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -25,7 +26,7 @@
|
||||
<script>
|
||||
import { getPdlDataOneDay } from '@/api/core/monitoring/data24'
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import { getSchedulingMonitoringRecord } from '@/api/monitoring/teamProduction'
|
||||
import { getSchedulingMonitoringRecord1 } from '@/api/monitoring/teamProduction'
|
||||
|
||||
export default {
|
||||
name: 'productionLineData24',
|
||||
@ -45,6 +46,7 @@ export default {
|
||||
arr: [],
|
||||
spanArr: [],
|
||||
timeList: [],
|
||||
tableH: this.tableHeight(240),
|
||||
tableData: [],
|
||||
tableProps: [],
|
||||
spanInfo: {},
|
||||
@ -54,6 +56,9 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(240)
|
||||
})
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
@ -83,7 +88,7 @@ export default {
|
||||
}
|
||||
this.tableProps = this.arr
|
||||
const paramsTime = [parseTime(timeArr[0]), parseTime(timeArr[23])]
|
||||
await getSchedulingMonitoringRecord({checkTime: paramsTime}).then(res =>{
|
||||
await getSchedulingMonitoringRecord1({checkTime: paramsTime}).then(res =>{
|
||||
// 报废数据
|
||||
this.monitorList = res.data.data
|
||||
console.log('报废', this.monitorList)
|
||||
@ -148,6 +153,9 @@ export default {
|
||||
lineData['spec'] = Array.from(new Set(specs)).join(',')
|
||||
this.tableData.push(lineData)
|
||||
})
|
||||
this.tableData.forEach((item, index) => {
|
||||
item._index = index + 1
|
||||
})
|
||||
console.log('打印', this.tableData)
|
||||
// this.setRowSpan(sectionArr)
|
||||
// console.log('工段名称列表', sectionArr)
|
||||
@ -176,22 +184,26 @@ export default {
|
||||
console.log('看看数据', res)
|
||||
this.ResData = res.data
|
||||
this.arr = [
|
||||
{
|
||||
prop: '_index',
|
||||
label: '序号'
|
||||
},
|
||||
{
|
||||
prop: 'proLineName',
|
||||
label: '生产线',
|
||||
fixed: 'left',
|
||||
// fixed: 'left',
|
||||
'show-overflow-tooltip': true
|
||||
},
|
||||
{
|
||||
prop: 'workOrderName',
|
||||
label: '当前工单',
|
||||
fixed: 'left',
|
||||
// fixed: 'left',
|
||||
'show-overflow-tooltip': true
|
||||
},
|
||||
{
|
||||
prop: 'spec',
|
||||
label: '产品规格',
|
||||
fixed: 'left',
|
||||
// fixed: 'left',
|
||||
'show-overflow-tooltip': true
|
||||
}
|
||||
]
|
||||
|
@ -12,6 +12,7 @@
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:max-height="tableH"
|
||||
:table-data="tableData"></base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
@ -30,6 +31,7 @@ import {
|
||||
} from '@/api/cost/costEneryAutoReport';
|
||||
import { getEnergyTypeListAll } from '@/api/base/energyType';
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
import moment from 'moment';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
@ -68,6 +70,7 @@ export default {
|
||||
},
|
||||
tableData: [],
|
||||
tableProps,
|
||||
tableH: this.tableHeight(260),
|
||||
drawerVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
@ -108,6 +111,9 @@ export default {
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
getEnergyTypeListAll().then((response) => {
|
||||
this.formConfig[0].selectOptions = response.data;
|
||||
});
|
||||
@ -132,18 +138,26 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.energyTypeId = val.energyTypeId;
|
||||
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||
this.listQuery.startTime = val.searchTime
|
||||
? moment(val.searchTime[0]).startOf('day').format('x')
|
||||
: null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? moment(val.searchTime[1]).endOf('day').format('x')
|
||||
: null;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
const data = {
|
||||
energyTypeId:val.energyTypeId,
|
||||
startTime : val.searchTime ? val.searchTime[0] : null,
|
||||
endTime : val.searchTime ? val.searchTime[1] : null,
|
||||
startTime : val.searchTime
|
||||
? moment(val.searchTime[0]).startOf('day').format('x')
|
||||
: null,
|
||||
endTime : val.searchTime
|
||||
? moment(val.searchTime[1]).endOf('day').format('x')
|
||||
: null,
|
||||
}
|
||||
this.handleExport(data);
|
||||
break;
|
||||
|
@ -12,6 +12,7 @@
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:max-height="tableH"
|
||||
:table-data="tableData"></base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
@ -79,6 +80,7 @@ export default {
|
||||
},
|
||||
tableData: [],
|
||||
tableProps,
|
||||
tableH: this.tableHeight(260),
|
||||
drawerVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
@ -133,6 +135,9 @@ export default {
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
@ -150,7 +155,7 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.reportType = val.reportType;
|
||||
this.listQuery.energyTypeId = val.energyTypeId;
|
||||
this.listQuery.reportTime = val.searchTime
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-12-07 09:35:33
|
||||
* @LastEditTime: 2024-03-25 14:11:46
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -17,7 +17,7 @@ export default {
|
||||
},
|
||||
tableData: [],
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 13:52:10
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-02-19 09:36:50
|
||||
* @LastEditTime: 2024-03-21 15:59:26
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -44,7 +44,7 @@
|
||||
v-for="item in urlOptions.dictList.dict0"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
:value="parseInt(item.value)"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -12,6 +12,7 @@
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:max-height="tableH"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
@ -61,7 +62,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'code',
|
||||
label: '原料编码',
|
||||
width: 190,
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
prop: 'grade',
|
||||
@ -79,10 +80,9 @@ const tableProps = [
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
prop: 'enabledTime',
|
||||
prop: 'time',
|
||||
label: '生效时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
width: 235,
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
@ -99,6 +99,7 @@ export default {
|
||||
deleteURL: deleteCostMaterialSet,
|
||||
},
|
||||
tableProps,
|
||||
tableH: this.tableHeight(260),
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`cost:rawMaterialConfig:update`)
|
||||
? {
|
||||
@ -147,6 +148,9 @@ export default {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
getHotMaterialList().then((response) => {
|
||||
this.formConfig[0].selectOptions = response.data;
|
||||
});
|
||||
@ -156,14 +160,14 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.materialId = val.name;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
|
@ -12,6 +12,7 @@
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:max-height="tableH"
|
||||
:table-data="tableData"></base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
@ -74,6 +75,7 @@ export default {
|
||||
},
|
||||
tableData: [],
|
||||
tableProps,
|
||||
tableH: this.tableHeight(260),
|
||||
drawerVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
@ -114,6 +116,9 @@ export default {
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
getHotMaterialList().then((response) => {
|
||||
this.formConfig[0].selectOptions = response.data;
|
||||
});
|
||||
@ -138,7 +143,7 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.materialId = val.materialId;
|
||||
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.startTime = val.searchTime
|
||||
@ -152,8 +157,12 @@ export default {
|
||||
case 'export':
|
||||
this.listQuery.materialId = val.materialId;
|
||||
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||
this.listQuery.startTime = val.searchTime
|
||||
? moment(val.searchTime[0]).startOf('day').format('x')
|
||||
: null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? moment(val.searchTime[1]).endOf('day').format('x')
|
||||
: null;
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
|
@ -12,6 +12,7 @@
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:max-height="tableH"
|
||||
:table-data="tableData"></base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
@ -41,7 +42,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'reportName',
|
||||
label: '时间',
|
||||
minWidth: 150,
|
||||
minWidth: 160,
|
||||
},
|
||||
{
|
||||
prop: 'rawMaterialName',
|
||||
@ -78,6 +79,7 @@ export default {
|
||||
},
|
||||
tableData: [],
|
||||
tableProps,
|
||||
tableH: this.tableHeight(260),
|
||||
drawerVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
@ -132,6 +134,9 @@ export default {
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
@ -149,7 +154,7 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.reportType = val.reportType;
|
||||
this.listQuery.materialId = val.materialId;
|
||||
this.listQuery.times = val.searchTime
|
||||
|
@ -2,42 +2,18 @@
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="80"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||
:max-height="tableH">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||
@pagination="getList" />
|
||||
<!-- 新增 -->
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="centervisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
>
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<energy-plc-add ref="energyPlc" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
</div>
|
||||
@ -50,7 +26,8 @@ import EnergyPlcAdd from './components/energyPlcAdd.vue'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'plcTableName',
|
||||
label: '关联表名'
|
||||
label: '关联表名',
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
@ -60,7 +37,9 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '标识名'
|
||||
label: '标识名',
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'enName',
|
||||
@ -109,21 +88,21 @@ export default {
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:energy-plc:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:energy-plc:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
tableH: this.tableHeight(260),
|
||||
collectionList: [
|
||||
{value: 0,label: '否'},
|
||||
{value: 1,label: '是'}
|
||||
{ value: 0, label: '否' },
|
||||
{ value: 1, label: '是' }
|
||||
],
|
||||
// 总条数
|
||||
total: 0,
|
||||
@ -167,7 +146,7 @@ export default {
|
||||
getList() {
|
||||
getEnergyPlcPage(this.queryParams).then(response => {
|
||||
let arr = response.data.list || [];
|
||||
arr&&arr.map(item => {
|
||||
arr && arr.map(item => {
|
||||
this.collectionList.map(i => {
|
||||
if (item.collection === i.value) {
|
||||
item.collection = i.label
|
||||
@ -188,7 +167,7 @@ export default {
|
||||
this.centervisible = true
|
||||
break
|
||||
default:
|
||||
this.handleDelete(val.data)
|
||||
this.handleDelete(val.data)
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
@ -205,13 +184,13 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除关联表名为"' + row.name + '"的数据项?').then(function() {
|
||||
return deleteEnergyPlc(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
this.$modal.confirm('是否确认删除关联表名为"' + row.name + '"的数据项?').then(function () {
|
||||
return deleteEnergyPlc(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,47 +2,23 @@
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="160"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||
:max-height="tableH">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="160" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||
@pagination="getList" />
|
||||
<!-- 新增 -->
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="centervisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width='30%'
|
||||
>
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel" width='30%'>
|
||||
<energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
<!-- 参数绑定/查看 -->
|
||||
<energy-plc-param v-if="paramVisible" ref="plcParam" @closeDrawer="closeDrawer" :energyTypeList="energyTypeList"></energy-plc-param>
|
||||
<energy-plc-param v-if="paramVisible" ref="plcParam" @closeDrawer="closeDrawer"
|
||||
:energyTypeList="energyTypeList"></energy-plc-param>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -63,17 +39,20 @@ const tableProps = [
|
||||
label: '对象编码'
|
||||
},
|
||||
{
|
||||
prop: 'plcTableName',
|
||||
prop: 'plcTableName',
|
||||
label: '关联表名'
|
||||
},
|
||||
{
|
||||
prop: 'plcTableCode',
|
||||
label: '关联表编码',
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'cnName',
|
||||
label: '标识名'
|
||||
label: '标识名',
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'varNum',
|
||||
@ -113,9 +92,9 @@ export default {
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:energy-plc-connect:bind')
|
||||
? {
|
||||
type: 'connect',
|
||||
btnName: '绑定'
|
||||
}
|
||||
type: 'connect',
|
||||
btnName: '绑定'
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'detail',
|
||||
@ -123,15 +102,15 @@ export default {
|
||||
},
|
||||
this.$auth.hasPermi('base:energy-plc-connect:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:energy-plc-connect:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
tableH: this.tableHeight(260),
|
||||
@ -230,13 +209,13 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除对象为"' + row.objName + '"的数据项?').then(function() {
|
||||
return deleteEnergyPlcConnect(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
this.$modal.confirm('是否确认删除对象为"' + row.objName + '"的数据项?').then(function () {
|
||||
return deleteEnergyPlcConnect(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
closeDrawer() {
|
||||
this.getList()
|
||||
|
@ -104,24 +104,24 @@ export default {
|
||||
{ name: '故障时长', value: 580 },
|
||||
],
|
||||
},
|
||||
{
|
||||
// 内环
|
||||
name: '',
|
||||
type: 'pie',
|
||||
center: ['50%', '48%'],
|
||||
radius: ['60%', '75%'],
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
},
|
||||
data: [
|
||||
//<=========
|
||||
{ name: '总', value: 3000 },
|
||||
{ name: '', value: 1400 },
|
||||
],
|
||||
},
|
||||
// {
|
||||
// // 内环
|
||||
// name: '',
|
||||
// type: 'pie',
|
||||
// center: ['50%', '48%'],
|
||||
// radius: ['60%', '75%'],
|
||||
// itemStyle: {
|
||||
// borderRadius: 10,
|
||||
// },
|
||||
// label: {
|
||||
// show: false,
|
||||
// },
|
||||
// data: [
|
||||
// //<=========
|
||||
// { name: '总', value: 3000 },
|
||||
// { name: '', value: 1400 },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// name: this.value.equipmentName || 'Default',
|
||||
// type: 'pie',
|
||||
@ -195,22 +195,22 @@ export default {
|
||||
this.config.title.text = lineName;
|
||||
this.config.title.subtext = equipmentName;
|
||||
this.config.series[0].data = [
|
||||
{ name: '工作时长', value: workTime },
|
||||
{ name: '停机时长', value: stopTime },
|
||||
{ name: '故障时长', value: downTime },
|
||||
];
|
||||
this.config.series[1].data = [
|
||||
{ name: '速度开动率', value: peEfficiency },
|
||||
{ name: '', value: 100 },
|
||||
// { name: '速度开动率', value: peEfficiency },
|
||||
// { name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
||||
{ name: '有效时长', value: workTime },
|
||||
{ name: '关机时长', value: stopTime },
|
||||
{ name: '中断时长', value: downTime }
|
||||
];
|
||||
// this.config.series[1].data = [
|
||||
// { name: '速度开动率', value: peEfficiency },
|
||||
// // { name: '', value: 100 },
|
||||
// // { name: '速度开动率', value: peEfficiency },
|
||||
// // { name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
||||
// ];
|
||||
//
|
||||
this.textData = {
|
||||
workTime: +workTime.toFixed(2),
|
||||
stopTime: +stopTime.toFixed(2),
|
||||
downTime: +downTime.toFixed(2),
|
||||
peEfficiency: +peEfficiency.toFixed(2),
|
||||
workTime: +workTime?.toFixed(2),
|
||||
stopTime: +stopTime?.toFixed(2),
|
||||
downTime: +downTime?.toFixed(2),
|
||||
// peEfficiency: +peEfficiency?.toFixed(2),
|
||||
};
|
||||
},
|
||||
},
|
||||
|
@ -26,7 +26,8 @@
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-data="list"
|
||||
@emitFun="handleEmitFun"></base-table>
|
||||
@emitFun="handleEmitFun"
|
||||
:max-height="tableH"></base-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
|
||||
<div
|
||||
@ -57,6 +58,7 @@ export default {
|
||||
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableH: this.tableHeight(260),
|
||||
urls: {
|
||||
page: '/analysis/equipment-analysis/quality',
|
||||
},
|
||||
@ -155,12 +157,12 @@ export default {
|
||||
},
|
||||
{
|
||||
// width: 160,
|
||||
prop: 'inQuantity',
|
||||
prop: 'totalQuantity',
|
||||
label: '加工数量',
|
||||
},
|
||||
{
|
||||
// width: 160,
|
||||
prop: 'outQuantity',
|
||||
prop: 'okQuantity',
|
||||
label: '合格数量',
|
||||
},
|
||||
{
|
||||
@ -252,6 +254,9 @@ export default {
|
||||
this.fillProductOptions();
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
this.$refs['search-bar'].headBtnClick('search');
|
||||
},
|
||||
methods: {
|
||||
|
@ -46,9 +46,9 @@
|
||||
<el-table-column
|
||||
v-if="selectedBox[2]"
|
||||
label="巡检时间"
|
||||
prop="planCheckTime">
|
||||
prop="actualCheckTime">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.planCheckTime | timeFilter }}
|
||||
{{ scope.row.actualCheckTime | timeFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-18 15:47:20
|
||||
* @LastEditTime: 2024-03-25 15:44:49
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -36,7 +36,8 @@
|
||||
<el-select
|
||||
v-model="dataForm.departmentId"
|
||||
:disabled="isdetail"
|
||||
:placeholder="`请选择部门`">
|
||||
:placeholder="`请选择部门`"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="opt in departmentOptions"
|
||||
:key="opt.id"
|
||||
@ -84,39 +85,38 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="巡检时间" prop="planCheckTime">
|
||||
<el-form-item label="实际巡检时间" prop="actualCheckTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planCheckTime"
|
||||
v-model="dataForm.actualCheckTime"
|
||||
type="datetime"
|
||||
:disabled="isdetail"
|
||||
placeholder="请选择巡检时间"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
placeholder="请选择实际巡检时间"
|
||||
value-format="timestamp"
|
||||
style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="attr-list" v-if="idAttrShow">
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
<div v-if="idAttrShow">
|
||||
<small-title>
|
||||
巡检内容
|
||||
</small-title>
|
||||
|
||||
<div v-if="!isdetail">
|
||||
<div>
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="attr-search-bar"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
</div>
|
||||
<!-- <template>
|
||||
<span style="display: inline-block;" @click="addNew()">
|
||||
<div v-if="!isdetail" style="display: flex">
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="attr-search-bar"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
<!-- <div class="action_btn"> -->
|
||||
<el-button type="text" class="action_btn" @click="addNew()">
|
||||
<span style="display: inline-block;">
|
||||
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
||||
<span class="add">添加</span>
|
||||
<span class="add">添加内容</span>
|
||||
</span>
|
||||
</template> -->
|
||||
</el-button>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
@ -229,14 +229,14 @@ export default {
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true
|
||||
}
|
||||
// {
|
||||
// type: 'button',
|
||||
// btnName: '新增',
|
||||
// name: 'add',
|
||||
// color: 'success',
|
||||
// plain: true
|
||||
// }
|
||||
],
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
@ -250,7 +250,7 @@ export default {
|
||||
departmentId: undefined,
|
||||
groupClass: [],
|
||||
checkPerson: [],
|
||||
planCheckTime: undefined
|
||||
actualCheckTime: undefined
|
||||
},
|
||||
detList: [],
|
||||
groupOptions: [],
|
||||
@ -519,10 +519,6 @@ export default {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
margin: 0;
|
||||
padding: 32px 32px 24px;
|
||||
@ -551,11 +547,6 @@ export default {
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form,
|
||||
.drawer >>> .attr-list {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
@ -563,7 +554,7 @@ export default {
|
||||
}
|
||||
.action_btn {
|
||||
float: right;
|
||||
margin: -32px 15px 0;
|
||||
/* margin: 0 15px 0; */
|
||||
font-size: 14px;
|
||||
}
|
||||
.add {
|
||||
|
@ -66,7 +66,7 @@ import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/bas
|
||||
import AddContent from './addContent.vue';
|
||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||
|
||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
|
||||
const btn = {
|
||||
name: 'tableBtn',
|
||||
@ -129,20 +129,22 @@ export default {
|
||||
// width: 180,
|
||||
// filter: timeFilter,
|
||||
// },
|
||||
{ prop: 'maintainOrderNumber', label: '设备保养单号' },
|
||||
{ prop: 'planName', label: '保养计划名称' },
|
||||
{ prop: 'departmentName', label: '部门' },
|
||||
{ prop: 'lineName', label: '产线名' },
|
||||
{ prop: 'planStartTime', label: '计划开始时间', filter: timeFilter },
|
||||
{ prop: 'planEndTime', label: '计划结束时间', filter: timeFilter },
|
||||
{ prop: 'startTime', label: '实际开始时间', filter: timeFilter },
|
||||
{ prop: 'endTime', label: '实际结束时间', filter: timeFilter },
|
||||
{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 170, showOverflowtooltip: true },
|
||||
{ prop: 'planName', label: '保养计划名称', width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'departmentName', label: '部门', width: 120, showOverflowtooltip: true },
|
||||
{ prop: 'lineName', label: '产线名', width: 120, showOverflowtooltip: true },
|
||||
{ prop: 'planStartTime', label: '计划开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'planEndTime', label: '计划结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'startTime', label: '实际开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'endTime', label: '实际结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
|
||||
// { prop: 'equipmentName', label: '设备名称' },
|
||||
// { prop: 'maintainWorker', label: '保养人员' },
|
||||
{
|
||||
prop: 'relatePlan',
|
||||
label: '保养计划类型',
|
||||
filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''),
|
||||
width: 170,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn }
|
||||
// { prop: 'maintainDuration', label: '计划保养用时(h)' },
|
||||
|
@ -393,7 +393,7 @@
|
||||
:file="file"
|
||||
:key="file.fileUrl"
|
||||
:disabled="disabled"
|
||||
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
||||
@delete="!disabled && handleDeleteFile(file)" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -678,10 +678,12 @@ export default {
|
||||
file.type === 'image/jpeg' ||
|
||||
file.type === 'image/png' ||
|
||||
file.type === 'image/jpg';
|
||||
if (!isJPG) {
|
||||
this.$modal.msgError('只能上传jpg/png文件!');
|
||||
}
|
||||
return isJPG;
|
||||
};
|
||||
return checkFileSize();
|
||||
// return checkFileSize() && checkFileType();
|
||||
return checkFileSize() && checkFileType();
|
||||
},
|
||||
|
||||
// handlers
|
||||
@ -737,7 +739,6 @@ export default {
|
||||
fileType: prop == 'files' ? 2 : 1,
|
||||
});
|
||||
this.$modal.msgSuccess('上传成功');
|
||||
console.log('为我', this.form.files)
|
||||
this.$emit('update', this.form);
|
||||
},
|
||||
|
||||
|
@ -92,23 +92,34 @@ export default {
|
||||
});
|
||||
if (code == 0) {
|
||||
this.listLine = data;
|
||||
return;
|
||||
} else {
|
||||
this.listLine.splice(0);
|
||||
}
|
||||
this.listLine.splice(0);
|
||||
},
|
||||
async getEquipmentByLineId(id) {
|
||||
const { data, code } = await this.$axios({
|
||||
url: '/base/core-equipment/listByLine',
|
||||
params: {
|
||||
id,
|
||||
},
|
||||
// 获得全部设备
|
||||
const res = await this.$axios({
|
||||
url: '/base/core-equipment/listAll',
|
||||
});
|
||||
if (code == 0) {
|
||||
this.listEq = data;
|
||||
if (res.code == 0) {
|
||||
this.listEq = res.data;
|
||||
return;
|
||||
}
|
||||
this.listEq.splice(0);
|
||||
},
|
||||
async getEquipmentByLineId(id) {
|
||||
if (id) {
|
||||
const { data, code } = await this.$axios({
|
||||
url: '/base/core-equipment/listByLine',
|
||||
params: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
if (code == 0) {
|
||||
this.listEq = data;
|
||||
return;
|
||||
}
|
||||
this.listEq.splice(0);
|
||||
}
|
||||
},
|
||||
handleSearch() {
|
||||
this.$emit('action', {
|
||||
action: 'search',
|
||||
|
@ -2,11 +2,11 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-20 09:18:30
|
||||
* @LastEditTime: 2024-03-22 17:11:55
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="false" class="drawer" size="50%">
|
||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
@ -75,7 +75,7 @@
|
||||
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-body__footer">
|
||||
<div v-if="!isdetail" class="drawer-body__footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</div>
|
||||
@ -198,7 +198,7 @@ export default {
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||
this.urlOptions.updateURL(this.dataForm).then(res => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
@ -206,7 +206,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
this.urlOptions.createURL(this.dataForm).then(res => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.idAttrShow = true;
|
||||
this.dataForm.id = res.data
|
||||
|
@ -2,11 +2,11 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-20 09:17:11
|
||||
* @LastEditTime: 2024-03-25 14:07:31
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="false" class="drawer" size="50%">
|
||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
@ -289,7 +289,7 @@ export default {
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||
this.urlOptions.updateURL(this.dataForm).then(res => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
@ -297,7 +297,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
this.urlOptions.createURL(this.dataForm).then(res => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.idAttrShow = true;
|
||||
this.dataForm.id = res.data
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-08 15:30:27
|
||||
* @LastEditTime: 2023-12-04 15:19:33
|
||||
* @LastEditTime: 2024-03-25 14:14:04
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -118,7 +118,7 @@ export default {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
getProcessEquValueBomDet({
|
||||
id: this.dataForm.id
|
||||
id: this.dataForm.id,
|
||||
}).then((res) => {
|
||||
this.dataForm = res.data;
|
||||
const arr = []
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-08 14:00:52
|
||||
* @LastEditTime: 2023-11-09 09:59:53
|
||||
* @LastEditTime: 2024-03-25 14:09:33
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -25,24 +25,24 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
state: false
|
||||
// state: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
state() {
|
||||
return this.injectData.enabled === 1 ? true : false
|
||||
}
|
||||
},
|
||||
// computed: {
|
||||
// readonly() {
|
||||
// return !!this.injectData.readonly
|
||||
// }
|
||||
// },
|
||||
mounted() {
|
||||
this.mapToState()
|
||||
// this.mapToState()
|
||||
},
|
||||
|
||||
methods: {
|
||||
mapToState() {
|
||||
if (this.injectData.prop === 'enabled') {
|
||||
this.state = this.injectData.enabled === 1 ? true : false
|
||||
}
|
||||
},
|
||||
// mapToState() {
|
||||
// if (this.injectData.prop === 'enabled') {
|
||||
// this.state = this.injectData.enabled === 1 ? true : false
|
||||
// }
|
||||
// },
|
||||
changeHandler() {
|
||||
// let params = {}
|
||||
let payload = {}
|
||||
|
@ -2,43 +2,18 @@
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||
:max-height="tableH">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||
@pagination="getList" />
|
||||
<!-- 新增 -->
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="centervisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width='50%'
|
||||
>
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel" width='50%'>
|
||||
<group-class-add ref="classList" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
</div>
|
||||
@ -85,7 +60,7 @@ const tableProps = [
|
||||
}
|
||||
]
|
||||
export default {
|
||||
name: "GroupClass",
|
||||
name: "GroupClasses",
|
||||
components: { GroupClassAdd },
|
||||
data() {
|
||||
return {
|
||||
@ -115,33 +90,33 @@ export default {
|
||||
],
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:group-classes:cancel')
|
||||
this.$auth.hasPermi('base:group-classes:cancel')
|
||||
? {
|
||||
type: 'cancel',
|
||||
btnName: '作废',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'status',
|
||||
value: '不可用'
|
||||
}
|
||||
]
|
||||
}
|
||||
type: 'cancel',
|
||||
btnName: '作废',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'status',
|
||||
value: '不可用'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:group-classes:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:group-classes:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
tableH: this.tableHeight(260),
|
||||
@ -213,7 +188,7 @@ export default {
|
||||
this.discard(val.data)
|
||||
break
|
||||
default:
|
||||
this.handleDelete(val.data)
|
||||
this.handleDelete(val.data)
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
@ -235,33 +210,33 @@ export default {
|
||||
obj.endTime = row.endTime
|
||||
obj.enableTime = row.enableTime
|
||||
obj.disableTime = Date.parse(new Date())
|
||||
this.$modal.confirm('是否确认作废班次名称为"' + row.name + '"的数据项?').then(function() {
|
||||
return updateGroupClasses({ ...obj })
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {});
|
||||
this.$modal.confirm('是否确认作废班次名称为"' + row.name + '"的数据项?').then(function () {
|
||||
return updateGroupClasses({ ...obj })
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row)
|
||||
let _this = this
|
||||
if (row.status === '可用') {// 可用
|
||||
_this.$modal.confirm('删除的班次"' + row.name + '"可能会影响交接班计划,请点取消再次确认!').then(function() {
|
||||
return _this.$modal.confirm('是否确认删除班次名称为"' + row.name + '"的数据项?').then(function() {
|
||||
return deleteGroupClasses(row.id);
|
||||
}).then(() => {
|
||||
_this.getList();
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
})
|
||||
} else {
|
||||
_this.$modal.confirm('是否确认删除班次名称为"' + row.name + '"的数据项?').then(function() {
|
||||
_this.$modal.confirm('删除的班次"' + row.name + '"可能会影响交接班计划,请点取消再次确认!').then(function () {
|
||||
return _this.$modal.confirm('是否确认删除班次名称为"' + row.name + '"的数据项?').then(function () {
|
||||
return deleteGroupClasses(row.id);
|
||||
}).then(() => {
|
||||
_this.getList();
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
})
|
||||
} else {
|
||||
_this.$modal.confirm('是否确认删除班次名称为"' + row.name + '"的数据项?').then(function () {
|
||||
return deleteGroupClasses(row.id);
|
||||
}).then(() => {
|
||||
_this.getList();
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -297,16 +297,16 @@ export default {
|
||||
this.handleLogin({});
|
||||
},
|
||||
getCookie() {
|
||||
// const username = getUsername();
|
||||
// const password = getPassword();
|
||||
// const rememberMe = getRememberMe();
|
||||
const username = getUsername();
|
||||
const password = getPassword();
|
||||
const rememberMe = getRememberMe()
|
||||
const tenantName = getTenantName();
|
||||
this.loginForm = {
|
||||
...this.loginForm,
|
||||
username: username ? username : this.loginForm.username,
|
||||
password: password ? password : this.loginForm.password,
|
||||
username: username ? username : this.loginForm.username,
|
||||
password: password ? password : this.loginForm.password,
|
||||
rememberMe: rememberMe ? getRememberMe() : false,
|
||||
tenantName: tenantName ? tenantName : this.loginForm.tenantName,
|
||||
tenantName: tenantName ? tenantName : this.loginForm.tenantName,
|
||||
};
|
||||
},
|
||||
handleLogin(captchaParams) {
|
||||
|
@ -21,7 +21,7 @@
|
||||
</el-col>
|
||||
<el-col :span='4'>
|
||||
<div class="blodTip">产品名称</div>
|
||||
<div class="lightTip">{{ orderMsg.productName }}</div>
|
||||
<div class="lightTip" :title='orderMsg.productName'>{{ orderMsg.productName }}</div>
|
||||
</el-col>
|
||||
<el-col :span='4'>
|
||||
<div class="blodTip">产品规格</div>
|
||||
@ -282,6 +282,9 @@ export default {
|
||||
font-weight: 400;
|
||||
color: rgba(102, 102, 102, 0.75);
|
||||
margin-bottom: 12px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,38 +1,21 @@
|
||||
<template>
|
||||
<div class="app-container orderMonitoring">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<el-tabs v-model="activeName" @tab-click="toggleTab">
|
||||
<el-tab-pane label="数据列表" name="dataList"></el-tab-pane>
|
||||
<el-tab-pane label="环形图" name="barChart"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- 表 -->
|
||||
<div v-if="activeName === 'dataList'">
|
||||
<base-table
|
||||
:page="1"
|
||||
:limit="1000000000000"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
row-key="id"
|
||||
:tree-props="{children: 'orderMonitorVOS', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="100"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
<base-table :page="1" :limit="1000000000000" :table-props="tableProps" :table-data="list" :max-height="tableH"
|
||||
row-key="id" :tree-props="{ children: 'orderMonitorVOS', hasChildren: 'hasChildren' }">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
</div>
|
||||
<!-- 图 -->
|
||||
<monitoring-ring-charts ref='monitoringRingCharts' v-else :chart-list='chartList'/>
|
||||
<monitoring-ring-charts ref='monitoringRingCharts' v-else :chart-list='chartList' />
|
||||
<!-- <pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@ -168,65 +151,65 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
list: [],
|
||||
tableH: this.tableHeight(305),
|
||||
tableH: this.tableHeight(260),
|
||||
total: 0,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
|
||||
this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
|
||||
? {
|
||||
type: 'orderDetail',
|
||||
btnName: '详情',
|
||||
showTip: '订单/工单详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'more',
|
||||
name: 'orderNum',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
type: 'orderDetail',
|
||||
btnName: '详情',
|
||||
showTip: '订单/工单详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'more',
|
||||
name: 'orderNum',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:order-completion-monitoring:qualityDet')
|
||||
this.$auth.hasPermi('base:order-completion-monitoring:qualityDet')
|
||||
? {
|
||||
type: 'qualityDetail',
|
||||
btnName: '质量',
|
||||
showTip: '质量详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'more',
|
||||
name: 'orderNum',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'woIdString',
|
||||
value: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
type: 'qualityDetail',
|
||||
btnName: '质量',
|
||||
showTip: '质量详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'more',
|
||||
name: 'orderNum',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'woIdString',
|
||||
value: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
: undefined
|
||||
// this.$auth.hasPermi('base:order-completion-monitoring:sendOut')
|
||||
// ? {
|
||||
// type: 'sendOutDetail',
|
||||
// btnName: '发货',
|
||||
// showTip: '发货详情',
|
||||
// showParam: {
|
||||
// type: '&',
|
||||
// data: [
|
||||
// {
|
||||
// type: 'more',
|
||||
// name: 'workOrderNum',
|
||||
// value: 1
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// : undefined
|
||||
// this.$auth.hasPermi('base:order-completion-monitoring:sendOut')
|
||||
// ? {
|
||||
// type: 'sendOutDetail',
|
||||
// btnName: '发货',
|
||||
// showTip: '发货详情',
|
||||
// showParam: {
|
||||
// type: '&',
|
||||
// data: [
|
||||
// {
|
||||
// type: 'more',
|
||||
// name: 'workOrderNum',
|
||||
// value: 1
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// : undefined
|
||||
].filter((v) => v),
|
||||
chartList: []
|
||||
}
|
||||
@ -234,7 +217,7 @@ export default {
|
||||
components: { MonitoringRingCharts },
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(305)
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
let start = moment().subtract(30, 'days').format('yyyy-MM-DD')
|
||||
let end = moment().format('yyyy-MM-DD')
|
||||
@ -245,10 +228,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getPage() {
|
||||
orderGroupMonitor({...this.queryParams}).then(res => {
|
||||
orderGroupMonitor({ ...this.queryParams }).then(res => {
|
||||
let arr = res.data || []
|
||||
if (arr.length > 0) {
|
||||
let color = ['#7164FF','#288AFF','#63BDFF','#8EF0AB','#FFCE6A']
|
||||
let color = ['#7164FF', '#288AFF', '#63BDFF', '#8EF0AB', '#FFCE6A']
|
||||
let arr2 = []
|
||||
arr.map(item => {
|
||||
item.orderType = '集团订单'//前端写死订单类型
|
||||
@ -261,11 +244,11 @@ export default {
|
||||
obj.num = item.planQuantity || 0
|
||||
let sunNum = 0
|
||||
if (item.orderMonitorVOS && item.orderMonitorVOS.length > 0) {
|
||||
for(let i = 0; i < item.orderMonitorVOS.length; i++) {
|
||||
for (let i = 0; i < item.orderMonitorVOS.length; i++) {
|
||||
item.orderMonitorVOS[i].orderType = '厂务订单'//前端写死订单类型
|
||||
item.orderMonitorVOS[i].id = item.orderMonitorVOS[i].orderid
|
||||
item.orderMonitorVOS[i].orderNum = item.orderMonitorVOS[i].workOrderNum
|
||||
woIdString+=item.orderMonitorVOS[i].woIdString?item.orderMonitorVOS[i].woIdString:''
|
||||
woIdString += item.orderMonitorVOS[i].woIdString ? item.orderMonitorVOS[i].woIdString : ''
|
||||
//==============图数据
|
||||
let subObj = {}
|
||||
subObj.value = item.orderMonitorVOS[i].actualquantity
|
||||
@ -273,9 +256,9 @@ export default {
|
||||
if (i < 5) {
|
||||
subObj.color = color[i]
|
||||
} else {
|
||||
subObj.color = color[i%5]
|
||||
subObj.color = color[i % 5]
|
||||
}
|
||||
sunNum+=(item.orderMonitorVOS[i].actualquantity || 0)
|
||||
sunNum += (item.orderMonitorVOS[i].actualquantity || 0)
|
||||
arr3.push(subObj)
|
||||
}
|
||||
}
|
||||
@ -295,7 +278,7 @@ export default {
|
||||
this.$refs.monitoringRingCharts.initChart()
|
||||
})
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
// 显示无数据的图片
|
||||
this.chartList = []
|
||||
}
|
||||
@ -320,24 +303,24 @@ export default {
|
||||
case 'orderDetail':
|
||||
if (val.data.orderType === '集团订单') {
|
||||
this.$router.push({// 去厂务订单详情
|
||||
path: '/order/base/order-manage/order-detail-data?orderIdString='+ val.data.orderIds.join(',')
|
||||
path: '/order/base/order-manage/order-detail-data?orderIdString=' + val.data.orderIds.join(',')
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.$router.push({// 去工单详情
|
||||
path: '/core/core-work-order-detail?woIdString='+val.data.woIdString
|
||||
path: '/core/core-work-order-detail?woIdString=' + val.data.woIdString
|
||||
})
|
||||
}
|
||||
break
|
||||
case 'qualityDetail':
|
||||
this.$router.push({
|
||||
path: '/quality/base/quality-inspection-data/detection-information/statistical-data?woIdString='+val.data.woIdString
|
||||
path: '/quality/base/quality-inspection-data/detection-information/statistical-data?woIdString=' + val.data.woIdString
|
||||
})
|
||||
break
|
||||
default:
|
||||
// this.$router.push({
|
||||
// path: '/delivery/delivery-log?orderId='+encodeURI(val.data.name)
|
||||
// })
|
||||
}
|
||||
// this.$router.push({
|
||||
// path: '/delivery/delivery-log?orderId='+encodeURI(val.data.name)
|
||||
// })
|
||||
}
|
||||
},
|
||||
toggleTab() {
|
||||
if (this.activeName === 'barChart' && this.chartList.length > 0) {
|
||||
@ -346,7 +329,7 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
@ -360,31 +343,39 @@ export default {
|
||||
height: 2px;
|
||||
background-color: #e4e7ed;
|
||||
}
|
||||
|
||||
.el-tabs__nav-wrap::after {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.el-tabs__item:hover {
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.el-tabs__item.is-active {
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.searchBarBox {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.boxTitle {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin:0 10px 16px 0;
|
||||
margin: 0 10px 16px 0;
|
||||
}
|
||||
|
||||
.blueTitle {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-08 13:46:17
|
||||
* @LastEditTime: 2024-03-21 10:40:52
|
||||
* @LastEditTime: 2024-03-25 08:50:25
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -73,12 +73,12 @@
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row :gutter="24" v-for="(item,index) in ingredientList" :key="item.id">
|
||||
<el-col :span="8">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="成分">
|
||||
{{ item.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="6">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.checkValue'" label="成分含量"
|
||||
:rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]">
|
||||
<el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail"
|
||||
@ -92,12 +92,12 @@
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值">
|
||||
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.minValue"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值">
|
||||
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.maxValue"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -162,7 +162,7 @@ export default {
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
name: null,
|
||||
},
|
||||
// 表单参数
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2024-03-20 09:38:10
|
||||
* @LastEditTime: 2024-03-22 17:13:16
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -10,7 +10,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工单号" prop="workOrderId">
|
||||
<el-select v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
||||
<el-select filterable v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
||||
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -58,6 +58,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-select v-model="dataForm.source" placeholder="请选择来源" multiple>
|
||||
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注" />
|
||||
|
@ -109,15 +109,15 @@ export default {
|
||||
param: 'workOrderId',
|
||||
filterable: true
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '班组',
|
||||
selectOptions: [],
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
param: 'teamId',
|
||||
filterable: true
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '班组',
|
||||
// selectOptions: [],
|
||||
// labelField: 'name',
|
||||
// valueField: 'id',
|
||||
// param: 'teamId',
|
||||
// filterable: true
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
@ -216,7 +216,7 @@ export default {
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.workOrderId = val.workOrderId ? val.workOrderId : undefined;
|
||||
this.listQuery.teamId = val.teamId ? val.teamId : undefined;
|
||||
// this.listQuery.teamId = val.teamId ? val.teamId : undefined;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
|
@ -244,7 +244,7 @@ export default {
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timerange',
|
||||
param: 'recordTime',
|
||||
},
|
||||
// {
|
||||
// parent: 'dateFilterType',
|
||||
@ -270,6 +270,7 @@ export default {
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'warning',
|
||||
|
||||
},
|
||||
// {
|
||||
// type: 'separate',
|
||||
@ -381,7 +382,7 @@ export default {
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
const { code, data } = await this.$axios({
|
||||
url: '/analysis/equipment-analysis/efficiency',
|
||||
method: 'get',
|
||||
@ -402,14 +403,14 @@ export default {
|
||||
if (btnName == 'search') {
|
||||
this.queryParams.workOrderId = payload.workOrderId || null;
|
||||
// this.queryParams.lineId = payload.lineId || null;
|
||||
if (0 == payload.dateFilterType) {
|
||||
this.queryParams.recordTime = payload.timerange;
|
||||
} else if (1 == payload.dateFilterType) {
|
||||
// if (0 == payload.dateFilterType) {
|
||||
this.queryParams.recordTime = payload.recordTime;
|
||||
// } else if (1 == payload.dateFilterType) {
|
||||
this.queryParams.recordTime = [
|
||||
`${payload.timeday} 00:00:00`,
|
||||
`${payload.timeday} 23:59:59`,
|
||||
payload.recordTime[0],
|
||||
payload.recordTime[1],
|
||||
];
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
this.handleExport()
|
||||
this.queryParams.recordTime = null;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-21 15:14:04
|
||||
* @LastEditTime: 2024-03-25 16:07:07
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -64,7 +64,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'source',
|
||||
label: '数据来源',
|
||||
filter: (val) => val == 1 ? '内部' : '外部'
|
||||
filter: (val) => val == 1 ? '手动' : '自动'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-24 15:15:24
|
||||
* @LastEditTime: 2024-03-18 16:00:41
|
||||
* @LastEditTime: 2024-03-26 17:56:11
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -40,7 +40,7 @@ import inputTable from './inputTable.vue';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
import moment from 'moment'
|
||||
import FileSaver from 'file-saver'
|
||||
import * as XLSX from 'xlsx'
|
||||
// import * as XLSX from 'xlsx'
|
||||
export default {
|
||||
components: { inputTable },
|
||||
data() {
|
||||
@ -66,7 +66,7 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
// this.getDict()
|
||||
this.getTodayStartTimeAndEndTime()
|
||||
this.getDataList()
|
||||
},
|
||||
@ -82,8 +82,9 @@ export default {
|
||||
},
|
||||
// 获取数据列表
|
||||
multipliedByHundred(str) {
|
||||
console.log(str);
|
||||
// console.log(str)
|
||||
if (str != 0) {
|
||||
if ( str != 0) {
|
||||
let floatVal = parseFloat(str);
|
||||
if (isNaN(floatVal)) {
|
||||
return 0;
|
||||
@ -103,6 +104,8 @@ export default {
|
||||
|
||||
},
|
||||
async getDataList() {
|
||||
const res = await getCorePLList()
|
||||
this.proLineList = res.data;
|
||||
this.dataListLoading = true
|
||||
if (this.listQuery.reportTime.length == 0) {
|
||||
this.$message({
|
||||
@ -116,10 +119,10 @@ export default {
|
||||
if (ele.det === false) {
|
||||
res.data[index].lineName = '合计'
|
||||
this.remark = res.data[index].remark
|
||||
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
|
||||
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
|
||||
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
|
||||
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null
|
||||
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null
|
||||
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
res.data.forEach(item => {
|
||||
@ -127,10 +130,16 @@ export default {
|
||||
if (item.lineId === it.id) {
|
||||
console.log(item)
|
||||
item.lineName = it.name
|
||||
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
|
||||
console.log(item.originalGlassStatisticsTrend);
|
||||
// if (!item.dailyOutputTrend) {
|
||||
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%'
|
||||
// } else {
|
||||
// item.dailyOutputTrend = null
|
||||
// }
|
||||
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.actualProductTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -175,8 +184,8 @@ export default {
|
||||
// console.log(val.setHours(7, 0, 0))
|
||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||
// let time = this.format(val.setHours(7, 0, 0))
|
||||
this.startTimeStamp = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.endTimeStamp = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||
this.endTimeStamp = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.startTimeStamp = this.format(val.setHours(7, 0, 1) - 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||
// console.log(this.listQuery.reportTime);
|
||||
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||
@ -214,30 +223,34 @@ export default {
|
||||
// 处理查询参数
|
||||
var xlsxParam = { raw: true };
|
||||
/* 从表生成工作簿对象 */
|
||||
var wb = XLSX.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩日原片生产汇总.xlsx"
|
||||
import('xlsx').then(excel => {
|
||||
var wb = excel.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = excel.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩日原片生产汇总.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
//do something......
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-12-13 14:10:04
|
||||
* @LastEditTime: 2024-03-18 09:57:30
|
||||
* @LastEditTime: 2024-03-22 09:45:23
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -198,6 +198,8 @@ const cols = [
|
||||
this.cols[0].children[2].children[1].label = text2
|
||||
this.cols[0].children[3].children[0].label = text1
|
||||
this.cols[0].children[3].children[1].label = text2
|
||||
this.cols[0].children[4].children[0].label = text1
|
||||
this.cols[0].children[4].children[1].label = text2
|
||||
this.cols[0].children[2].label = text3
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||
import inputTable from './inputTable.vue';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
import FileSaver from 'file-saver'
|
||||
import * as XLSX from 'xlsx'
|
||||
// import * as XLSX from 'xlsx'
|
||||
export default {
|
||||
components: { inputTable },
|
||||
data() {
|
||||
@ -57,7 +57,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getCurrentMonthFirst()
|
||||
this.getDict()
|
||||
// this.getDict()
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
@ -91,11 +91,15 @@ export default {
|
||||
strVal += '0';
|
||||
}
|
||||
return parseFloat(strVal);
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
|
||||
},
|
||||
// 获取数据列表
|
||||
async getDataList() {
|
||||
const res = await getCorePLList()
|
||||
this.proLineList = res.data;
|
||||
this.dataListLoading = true;
|
||||
if (this.listQuery.reportTime.length == 0) {
|
||||
this.$message({
|
||||
@ -109,10 +113,10 @@ export default {
|
||||
if (ele.det === false) {
|
||||
res.data[index].lineName = '合计'
|
||||
this.remark = res.data[index].remark
|
||||
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
|
||||
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
|
||||
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
|
||||
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null
|
||||
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null
|
||||
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
res.data.forEach(item => {
|
||||
@ -120,15 +124,36 @@ export default {
|
||||
if (item.lineId === it.id) {
|
||||
console.log(item)
|
||||
item.lineName = it.name
|
||||
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
|
||||
console.log(item.originalGlassStatisticsTrend);
|
||||
// if (!item.dailyOutputTrend) {
|
||||
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%'
|
||||
// } else {
|
||||
// item.dailyOutputTrend = null
|
||||
// }
|
||||
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.actualProductTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
})
|
||||
this.tableData = res.data
|
||||
this.listQuery.total = response.data.length;
|
||||
// this.tableData = response.data.filter(item => {
|
||||
// this.proLineList.forEach(it => {
|
||||
// if (item.lineId === it.id) {
|
||||
// item.lineName = it.name
|
||||
|
||||
// }
|
||||
// })
|
||||
// if (item.det === false) {
|
||||
// this.all = {
|
||||
// id: item.id,
|
||||
// remark: item.remark
|
||||
// }
|
||||
// }
|
||||
// return item.det === true
|
||||
// });
|
||||
this.listQuery.total = res.data.length;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
@ -200,30 +225,33 @@ export default {
|
||||
// 处理查询参数
|
||||
var xlsxParam = { raw: true };
|
||||
/* 从表生成工作簿对象 */
|
||||
var wb = XLSX.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩月原片生产汇总.xlsx"
|
||||
import('xlsx').then(excel => {
|
||||
var wb = excel.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = excel.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩月原片生产汇总.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
//do something......
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||
import inputTable from './inputTable.vue';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
import FileSaver from 'file-saver'
|
||||
import * as XLSX from 'xlsx'
|
||||
// import * as XLSX from 'xlsx'
|
||||
export default {
|
||||
components: { inputTable },
|
||||
data() {
|
||||
@ -86,23 +86,23 @@ export default {
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created () {
|
||||
// this.getDict()
|
||||
},
|
||||
mounted() {
|
||||
// const day = new Date().getDay()
|
||||
// console.log('周四', day)
|
||||
this.getCurrentWeekStartTimeAndEndTime()
|
||||
// this.changeTime(new Date(new Date().getTime() - day * 24 * 60 * 60 * 1000))
|
||||
this.getDict()
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
async getDict() {
|
||||
// 产线列表
|
||||
await getCorePLList().then(res => {
|
||||
this.proLineList = res.data;
|
||||
// this.getDataList()
|
||||
});
|
||||
},
|
||||
// async getDict() {
|
||||
// // 产线列表
|
||||
|
||||
|
||||
// },
|
||||
getCurrentWeekStartTimeAndEndTime() {
|
||||
this.reportTime = new Date()
|
||||
var weekday = new Array(7);
|
||||
@ -187,6 +187,8 @@ export default {
|
||||
},
|
||||
// 获取数据列表
|
||||
async getDataList() {
|
||||
const res = await getCorePLList()
|
||||
this.proLineList = res.data;
|
||||
this.dataListLoading = true;
|
||||
if (this.listQuery.reportTime.length == 0) {
|
||||
this.$message({
|
||||
@ -200,10 +202,10 @@ export default {
|
||||
if (ele.det === false) {
|
||||
res.data[index].lineName = '合计'
|
||||
this.remark = res.data[index].remark
|
||||
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
|
||||
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
|
||||
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
|
||||
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null
|
||||
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null
|
||||
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
res.data.forEach(item => {
|
||||
@ -211,15 +213,36 @@ export default {
|
||||
if (item.lineId === it.id) {
|
||||
console.log(item)
|
||||
item.lineName = it.name
|
||||
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
|
||||
console.log(item.originalGlassStatisticsTrend);
|
||||
// if (!item.dailyOutputTrend) {
|
||||
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%'
|
||||
// } else {
|
||||
// item.dailyOutputTrend = null
|
||||
// }
|
||||
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.actualProductTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
})
|
||||
this.tableData = res.data
|
||||
this.listQuery.total = response.data.length;
|
||||
// this.tableData = response.data.filter(item => {
|
||||
// this.proLineList.forEach(it => {
|
||||
// if (item.lineId === it.id) {
|
||||
// item.lineName = it.name
|
||||
|
||||
// }
|
||||
// })
|
||||
// if (item.det === false) {
|
||||
// this.all = {
|
||||
// id: item.id,
|
||||
// remark: item.remark
|
||||
// }
|
||||
// }
|
||||
// return item.det === true
|
||||
// });
|
||||
this.listQuery.total = res.data.length;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
@ -265,30 +288,33 @@ export default {
|
||||
// 处理查询参数
|
||||
var xlsxParam = { raw: true };
|
||||
/* 从表生成工作簿对象 */
|
||||
var wb = XLSX.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩周原片生产汇总.xlsx"
|
||||
import('xlsx').then(excel => {
|
||||
var wb = excel.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = excel.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩周原片生产汇总.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
//do something......
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -27,7 +27,7 @@ import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||
import inputTable from './inputTable.vue';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
import FileSaver from 'file-saver'
|
||||
import * as XLSX from 'xlsx'
|
||||
// import * as XLSX from 'xlsx'
|
||||
export default {
|
||||
components: { inputTable },
|
||||
data() {
|
||||
@ -53,7 +53,7 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
// this.getDict()
|
||||
},
|
||||
mounted () {
|
||||
this.getCurrentYearFirst()
|
||||
@ -98,6 +98,8 @@ export default {
|
||||
},
|
||||
// 获取数据列表
|
||||
async getDataList() {
|
||||
const res = await getCorePLList()
|
||||
this.proLineList = res.data;
|
||||
this.dataListLoading = true;
|
||||
if (this.listQuery.reportTime.length == 0) {
|
||||
this.$message({
|
||||
@ -111,10 +113,10 @@ export default {
|
||||
if (ele.det === false) {
|
||||
res.data[index].lineName = '合计'
|
||||
this.remark = res.data[index].remark
|
||||
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
|
||||
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
|
||||
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
|
||||
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null
|
||||
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null
|
||||
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
res.data.forEach(item => {
|
||||
@ -122,15 +124,36 @@ export default {
|
||||
if (item.lineId === it.id) {
|
||||
console.log(item)
|
||||
item.lineName = it.name
|
||||
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
|
||||
console.log(item.originalGlassStatisticsTrend);
|
||||
// if (!item.dailyOutputTrend) {
|
||||
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%'
|
||||
// } else {
|
||||
// item.dailyOutputTrend = null
|
||||
// }
|
||||
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.actualProductTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
})
|
||||
this.tableData = res.data
|
||||
this.listQuery.total = response.data.length;
|
||||
// this.tableData = response.data.filter(item => {
|
||||
// this.proLineList.forEach(it => {
|
||||
// if (item.lineId === it.id) {
|
||||
// item.lineName = it.name
|
||||
|
||||
// }
|
||||
// })
|
||||
// if (item.det === false) {
|
||||
// this.all = {
|
||||
// id: item.id,
|
||||
// remark: item.remark
|
||||
// }
|
||||
// }
|
||||
// return item.det === true
|
||||
// });
|
||||
this.listQuery.total = res.data.length;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
@ -174,30 +197,33 @@ export default {
|
||||
// 处理查询参数
|
||||
var xlsxParam = { raw: true };
|
||||
/* 从表生成工作簿对象 */
|
||||
var wb = XLSX.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩年原片生产汇总.xlsx"
|
||||
import('xlsx').then(excel => {
|
||||
var wb = excel.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = excel.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩年原片生产汇总.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
//do something......
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2024-03-18 15:24:10
|
||||
* @LastEditTime: 2024-03-26 09:41:07
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -49,7 +49,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="!disabled"></el-input>
|
||||
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * 100).toFixed(2)) + '%' :
|
||||
undefined}} </span>
|
||||
null}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
@ -73,7 +73,7 @@
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="!disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * 100).toFixed(2)) +
|
||||
'%' : undefined }} </span>
|
||||
'%' : null }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
@ -82,8 +82,8 @@
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
|
||||
100).toFixed(2)) +
|
||||
'%' : undefined }}
|
||||
100).toFixed(2)) +
|
||||
'%' : null }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -91,8 +91,8 @@
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
|
||||
100).toFixed(2)) +
|
||||
'%' : undefined }}
|
||||
100).toFixed(2)) +
|
||||
'%' : null }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -101,8 +101,8 @@
|
||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="!disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
|
||||
100).toFixed(2)) +
|
||||
'%' : undefined }}
|
||||
100).toFixed(2)) +
|
||||
'%' : null }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -113,8 +113,8 @@
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductPassNow ? parseFloat((scope.row.goodProductPassNow *
|
||||
100).toFixed(2)) +
|
||||
'%' : undefined }}
|
||||
100).toFixed(2)) +
|
||||
'%' : null }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -123,8 +123,8 @@
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductPassHis ? parseFloat((scope.row.goodProductPassHis *
|
||||
100).toFixed(2)) +
|
||||
'%' : undefined }}
|
||||
100).toFixed(2)) +
|
||||
'%' : null }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -133,8 +133,8 @@
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="!disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
|
||||
100).toFixed(2)) +
|
||||
'%' : undefined }}
|
||||
100).toFixed(2)) +
|
||||
'%' : null }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -146,7 +146,7 @@
|
||||
<span v-else>{{ remark ? remark : '请输入备注' }} </span>
|
||||
</div> -->
|
||||
</el-table>
|
||||
<div style="height: 50px;" class="remark" >
|
||||
<div style="height: 50px;" class="remark">
|
||||
<el-input placeholder="备注" v-model="remark" :disabled="disabled">
|
||||
</el-input>
|
||||
</div>
|
||||
@ -177,7 +177,7 @@ import {
|
||||
// import Editor from '@/components/Editor';
|
||||
import moment from 'moment';
|
||||
import FileSaver from 'file-saver'
|
||||
import * as XLSX from 'xlsx'
|
||||
// import * as XLSX from 'xlsx'
|
||||
// import DialogForm from './dialogForm.vue';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
@ -480,8 +480,8 @@ export default {
|
||||
// console.log(val.setHours(7, 0, 0))
|
||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||
// let time = this.format(val.setHours(7, 0, 0))
|
||||
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1) - 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||
this.timeTips = this.listQuery.reportTime[0] + ' - ' + this.listQuery.reportTime[1]
|
||||
// console.log(this.listQuery.reportTime);
|
||||
} else {
|
||||
@ -492,30 +492,33 @@ export default {
|
||||
// 处理查询参数
|
||||
var xlsxParam = { raw: true };
|
||||
/* 从表生成工作簿对象 */
|
||||
var wb = XLSX.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩月成品生产汇总.xlsx"
|
||||
import('xlsx').then(excel => {
|
||||
var wb = excel.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = excel.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩日成品生产汇总.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
//do something......
|
||||
})
|
||||
},
|
||||
// timeSelect() {
|
||||
// // switch (this.queryParams.timeDim) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2024-03-18 15:27:53
|
||||
* @LastEditTime: 2024-03-26 09:41:33
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -78,7 +78,7 @@
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="原片漏检率" align="center">
|
||||
<el-table-column prop="missCheckNow" label="今日" align="center">
|
||||
<el-table-column prop="missCheckNow" label="本月" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
|
||||
@ -87,7 +87,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="missCheckHis" label="昨日" align="center">
|
||||
<el-table-column prop="missCheckHis" label="上月" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
|
||||
@ -108,7 +108,7 @@
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="综合良品率" align="center">
|
||||
<el-table-column prop="goodProductPassNow" label="今日" align="center">
|
||||
<el-table-column prop="goodProductPassNow" label="本月" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
|
||||
</el-input>
|
||||
@ -118,7 +118,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
|
||||
<el-table-column prop="goodProductPassHis" label="上月" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
|
||||
</el-input>
|
||||
@ -180,7 +180,7 @@ import moment from 'moment';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
||||
import FileSaver from 'file-saver'
|
||||
import * as XLSX from 'xlsx'
|
||||
// import * as XLSX from 'xlsx'
|
||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
const tableProps = [
|
||||
{
|
||||
@ -470,30 +470,33 @@ export default {
|
||||
// 处理查询参数
|
||||
var xlsxParam = { raw: true };
|
||||
/* 从表生成工作簿对象 */
|
||||
var wb = XLSX.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩月成品生产汇总.xlsx"
|
||||
import('xlsx').then(excel => {
|
||||
var wb = excel.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = excel.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩月成品生产汇总.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
//do something......
|
||||
})
|
||||
},
|
||||
getCurrentMonthFirst() {
|
||||
const date = new Date();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2024-03-18 15:25:48
|
||||
* @LastEditTime: 2024-03-26 09:41:51
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -81,7 +81,7 @@
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="原片漏检率" align="center">
|
||||
<el-table-column prop="missCheckNow" label="今日" align="center">
|
||||
<el-table-column prop="missCheckNow" label="本周" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
|
||||
@ -90,7 +90,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="missCheckHis" label="昨日" align="center">
|
||||
<el-table-column prop="missCheckHis" label="上周" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
|
||||
@ -111,7 +111,7 @@
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="综合良品率" align="center">
|
||||
<el-table-column prop="goodProductPassNow" label="今日" align="center">
|
||||
<el-table-column prop="goodProductPassNow" label="本周" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
|
||||
</el-input>
|
||||
@ -121,7 +121,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
|
||||
<el-table-column prop="goodProductPassHis" label="上周" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
|
||||
</el-input>
|
||||
@ -488,30 +488,33 @@ export default {
|
||||
// 处理查询参数
|
||||
var xlsxParam = { raw: true };
|
||||
/* 从表生成工作簿对象 */
|
||||
var wb = XLSX.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩周成品生产汇总.xlsx"
|
||||
import('xlsx').then(excel => {
|
||||
var wb = excel.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = excel.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩周成品生产汇总.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
//do something......
|
||||
})
|
||||
},
|
||||
startWeek() {
|
||||
// console.log(this.weekValue1);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2024-03-18 15:25:54
|
||||
* @LastEditTime: 2024-03-26 09:42:08
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -83,7 +83,7 @@
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="原片漏检率" align="center">
|
||||
<el-table-column prop="missCheckNow" label="今日" align="center">
|
||||
<el-table-column prop="missCheckNow" label="今年" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
|
||||
@ -92,7 +92,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="missCheckHis" label="昨日" align="center">
|
||||
<el-table-column prop="missCheckHis" label="去年" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
|
||||
@ -113,7 +113,7 @@
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="综合良品率" align="center">
|
||||
<el-table-column prop="goodProductPassNow" label="今日" align="center">
|
||||
<el-table-column prop="goodProductPassNow" label="今年" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
|
||||
</el-input>
|
||||
@ -123,7 +123,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
|
||||
<el-table-column prop="goodProductPassHis" label="去年" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
|
||||
</el-input>
|
||||
@ -185,7 +185,7 @@ import moment from 'moment';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
||||
import FileSaver from 'file-saver'
|
||||
import * as XLSX from 'xlsx'
|
||||
// import * as XLSX from 'xlsx'
|
||||
const tableProps = [
|
||||
{
|
||||
// width: 128,
|
||||
@ -422,30 +422,33 @@ export default {
|
||||
// 处理查询参数
|
||||
var xlsxParam = { raw: true };
|
||||
/* 从表生成工作簿对象 */
|
||||
var wb = XLSX.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩年成品生产汇总.xlsx"
|
||||
import('xlsx').then(excel => {
|
||||
var wb = excel.utils.table_to_book(
|
||||
document.querySelector("#exportTable"),
|
||||
xlsxParam
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
/* 获取二进制字符串作为输出 */
|
||||
var wbout = excel.write(wb, {
|
||||
bookType: "xlsx",
|
||||
bookSST: true,
|
||||
type: "array",
|
||||
});
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"许昌安彩年成品生产汇总.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
}
|
||||
return wbout;
|
||||
//do something......
|
||||
})
|
||||
},
|
||||
// startYear() {
|
||||
// if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
||||
|
@ -83,8 +83,8 @@ export default {
|
||||
captchaEnable: true,
|
||||
loginForm: {
|
||||
loginType: "uname",
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
username: "",
|
||||
password: "",
|
||||
rememberMe: false,
|
||||
captchaVerification: "",
|
||||
},
|
||||
@ -144,8 +144,8 @@ export default {
|
||||
const password = getPassword();
|
||||
const rememberMe = getRememberMe();
|
||||
this.loginForm = {
|
||||
username: username ? username : this.loginForm.username,
|
||||
password: password ? password : this.loginForm.password,
|
||||
username: username ? username : this.loginForm.username,
|
||||
password: password ? password : this.loginForm.password,
|
||||
rememberMe: rememberMe ? getRememberMe() : false,
|
||||
loginType: this.loginForm.loginType,
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
this.lockReconnect = true;
|
||||
this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
|
||||
// 关闭心跳检查
|
||||
// heartCheck.stop();
|
||||
heartCheck.stop();
|
||||
}
|
||||
};
|
||||
const initWsEventHandle = () => {
|
||||
@ -50,13 +50,13 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
// 连接成功
|
||||
this.wsObj.onopen = (event) => {
|
||||
onWsOpen(event);
|
||||
// heartCheck.start();
|
||||
heartCheck.start();
|
||||
};
|
||||
|
||||
// 监听服务器端返回的信息
|
||||
this.wsObj.onmessage = (event) => {
|
||||
onWsMessage(event);
|
||||
// heartCheck.start();
|
||||
heartCheck.start();
|
||||
};
|
||||
|
||||
this.wsObj.onclose = (event) => {
|
||||
@ -123,7 +123,7 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
if (this.lockReconnect) {
|
||||
return;
|
||||
}
|
||||
writeToScreen("3秒后重连");
|
||||
writeToScreen("5秒后重连");
|
||||
this.lockReconnect = true;
|
||||
// 没连接上会一直重连,设置延迟避免请求过多
|
||||
this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
|
||||
@ -132,10 +132,40 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
this.createWebSoket();
|
||||
this.lockReconnect = false;
|
||||
writeToScreen("重连完成");
|
||||
}, 3000);
|
||||
}, 5000);
|
||||
};
|
||||
|
||||
// 心跳检查(看看websocket是否还在正常连接中)
|
||||
// 心跳检查(看看websocket是否还在正常连接中,不需要服务端返回,单向的)
|
||||
let _this = this
|
||||
let heartCheck = {
|
||||
timeout: 55000,
|
||||
timeoutObj: null,
|
||||
// 重启
|
||||
reset() {
|
||||
clearTimeout(this.timeoutObj);
|
||||
this.start();
|
||||
},
|
||||
// 停止
|
||||
stop() {
|
||||
clearTimeout(this.timeoutObj);
|
||||
},
|
||||
// 开启定时器
|
||||
start() {
|
||||
this.timeoutObj && clearTimeout(this.timeoutObj);
|
||||
this.timeoutObj = setTimeout(() => {
|
||||
writeToScreen("心跳检查,发送ping到后台");
|
||||
try {
|
||||
const datas = { ping: true };
|
||||
_this.wsObj.send(JSON.stringify(datas));
|
||||
} catch (err) {
|
||||
writeToScreen("发送ping异常");
|
||||
}
|
||||
}, this.timeout);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
// 心跳检查(看看websocket是否还在正常连接中,和服务端通信,双向的)
|
||||
// let heartCheck = {
|
||||
// timeout: 15000,
|
||||
// timeoutObj: null,
|
||||
@ -160,7 +190,7 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
// writeToScreen("心跳检查,发送ping到后台");
|
||||
// try {
|
||||
// const datas = { ping: true };
|
||||
// this.wsObj.send(JSON.stringify(datas));
|
||||
// _this.wsObj.send(JSON.stringify(datas));
|
||||
// } catch (err) {
|
||||
// writeToScreen("发送ping异常");
|
||||
// }
|
||||
|
@ -6,28 +6,33 @@ import store from "@/store";
|
||||
const timestr = new Date().getTime()
|
||||
const dcsConn = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_Dcs_API + '/xc-screen/websocket/dcsmsg'+timestr,
|
||||
process.env.VUE_APP_Socket_Dcs_API + '/xc-screen/websocket/dcsmsg' + timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
(data) => {
|
||||
// console.log('dcs成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "FanFrequencyInfo": {
|
||||
store.dispatch({type: "websocket/setFanFrequencyInfo", payload:msgData.data.FanFrequencyInfo})
|
||||
store.dispatch({ type: "websocket/setFanFrequencyInfo", payload: msgData.data.FanFrequencyInfo })
|
||||
break;
|
||||
}
|
||||
case "KilnInfo": {
|
||||
store.dispatch({type: "websocket/setKilnInfo", payload: msgData.data})
|
||||
store.dispatch({ type: "websocket/setKilnInfo", payload: msgData.data })
|
||||
break;
|
||||
}
|
||||
case "GasInfo": {
|
||||
store.dispatch({type: "websocket/setGasInfo", payload: msgData.data})
|
||||
store.dispatch({ type: "websocket/setGasInfo", payload: msgData.data })
|
||||
break;
|
||||
}
|
||||
case "SumGasInfo": {
|
||||
store.dispatch({type: "websocket/setSumGasInfo", payload: msgData.data})
|
||||
store.dispatch({ type: "websocket/setSumGasInfo", payload: msgData.data })
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -39,16 +44,20 @@ const dcsConn = new WsConnect(
|
||||
)
|
||||
// ISRA
|
||||
const mesIsra = new WsConnect(
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=KILN'+timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=KILN' + timestr,
|
||||
'',
|
||||
(data) => {
|
||||
// console.log('mes ISRA成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
// console.log(msgData)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "israKiln": {
|
||||
store.dispatch({type: "websocket/setIsraKiln", payload:msgData.detData.dayStatistic})
|
||||
store.dispatch({ type: "websocket/setIsraKiln", payload: msgData.detData.dayStatistic })
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -61,15 +70,20 @@ const mesIsra = new WsConnect(
|
||||
|
||||
// 原料 MA
|
||||
const mesMA = new WsConnect(
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=MA'+timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=MA' + timestr,
|
||||
'',
|
||||
(data) => {
|
||||
// console.log('mes 原料成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "material": {
|
||||
store.dispatch({type: "websocket/setMaterial", payload:msgData.data})
|
||||
store.dispatch({ type: "websocket/setMaterial", payload: msgData.data })
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -82,25 +96,30 @@ const mesMA = new WsConnect(
|
||||
// 能耗 EN
|
||||
const mesEN = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=ENERGY'+timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=ENERGY' + timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 能耗成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "EnergyInfo": {
|
||||
store.dispatch({type: "websocket/setEnergyInfo", payload:msgData.data})
|
||||
store.dispatch({ type: "websocket/setEnergyInfo", payload: msgData.data })
|
||||
break;
|
||||
}
|
||||
case "EnergyTrend": {
|
||||
store.dispatch({type: "websocket/setEnergyTrend", payload:msgData.data})
|
||||
store.dispatch({ type: "websocket/setEnergyTrend", payload: msgData.data })
|
||||
break;
|
||||
}
|
||||
case "EnergyMonitoring": {
|
||||
store.dispatch({type: "websocket/setEnergyMonitoring", payload:msgData.data})
|
||||
store.dispatch({ type: "websocket/setEnergyMonitoring", payload: msgData.data })
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -114,23 +133,30 @@ const mesEN = new WsConnect(
|
||||
// 烟气 GAS
|
||||
const mesGAS = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=GAS'+timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=GAS' + timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 烟气成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "exhaustGas": {
|
||||
store.dispatch({type: "websocket/setExhaustGasInfo", payload:msgData.realtime})
|
||||
store.dispatch({type: "websocket/setExhaustGasChart", payload:{
|
||||
dayTrend: msgData.dayTrend,
|
||||
weekTrend: msgData.weekTrend,
|
||||
monthTrend: msgData.monthTrend,
|
||||
yearTrend: msgData.yearTrend,
|
||||
}})
|
||||
store.dispatch({ type: "websocket/setExhaustGasInfo", payload: msgData.realtime })
|
||||
store.dispatch({
|
||||
type: "websocket/setExhaustGasChart", payload: {
|
||||
dayTrend: msgData.dayTrend,
|
||||
weekTrend: msgData.weekTrend,
|
||||
monthTrend: msgData.monthTrend,
|
||||
yearTrend: msgData.yearTrend,
|
||||
}
|
||||
})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -145,23 +171,30 @@ const mesGAS = new WsConnect(
|
||||
// 缺陷分类/统计 IS
|
||||
const mesIS = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=IS'+timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=IS' + timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 缺陷成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "isra": {
|
||||
store.dispatch({type: "websocket/setDefectChart", payload:{
|
||||
checkType: msgData.detData.checkType,
|
||||
dayStatistic: msgData.detData.dayStatistic,
|
||||
weekStatistic: msgData.detData.weekStatistic,
|
||||
monthStatistic: msgData.detData.monthStatistic,
|
||||
yearStatistic: msgData.detData.yearStatistic,
|
||||
}})
|
||||
store.dispatch({
|
||||
type: "websocket/setDefectChart", payload: {
|
||||
checkType: msgData.detData.checkType,
|
||||
dayStatistic: msgData.detData.dayStatistic,
|
||||
weekStatistic: msgData.detData.weekStatistic,
|
||||
monthStatistic: msgData.detData.monthStatistic,
|
||||
yearStatistic: msgData.detData.yearStatistic,
|
||||
}
|
||||
})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -176,29 +209,34 @@ const mesIS = new WsConnect(
|
||||
// 深加工生产运行驾驶舱(除能源) SJG
|
||||
const mesSJG = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=SJG'+timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=SJG' + timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 产线产量及良品率成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "productline": {
|
||||
store.dispatch({type: "websocket/setProductline", payload:msgData.detData})
|
||||
store.dispatch({ type: "websocket/setProductline", payload: msgData.detData })
|
||||
break;
|
||||
}
|
||||
case "equipment": {
|
||||
store.dispatch({type: "websocket/setSJGEq", payload:msgData.detData})
|
||||
store.dispatch({ type: "websocket/setSJGEq", payload: msgData.detData })
|
||||
break;
|
||||
}
|
||||
case "order": {
|
||||
store.dispatch({type: "websocket/setWorkOrder", payload:msgData.detData})
|
||||
store.dispatch({ type: "websocket/setWorkOrder", payload: msgData.detData })
|
||||
break;
|
||||
}
|
||||
case "defectSum": {
|
||||
store.dispatch({type: "websocket/setDefectSum", payload:msgData.detData})
|
||||
store.dispatch({ type: "websocket/setDefectSum", payload: msgData.detData })
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -213,18 +251,23 @@ const mesSJG = new WsConnect(
|
||||
// 订单完成情况 OV
|
||||
const mesOV = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=OV'+timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=OV' + timestr,
|
||||
// 'ws://192.168.0.33:48082/websocket/message?userId=OV'+timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 产线产量及良品率成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "order": {
|
||||
store.dispatch({type: "websocket/setOrder", payload:msgData.detData})
|
||||
store.dispatch({ type: "websocket/setOrder", payload: msgData.detData })
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -239,35 +282,39 @@ const mesOV = new WsConnect(
|
||||
// 本日生产良品率 CUTTING
|
||||
const mesCUTTING = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=CUTTING'+timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=CUTTING' + timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 产线产量及良品率成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
if (msgData == null) return;
|
||||
console.log(msgData)
|
||||
switch (msgData?.type) {
|
||||
case "cutting": {
|
||||
if (msgData?.name === 'table') {
|
||||
store.dispatch({type: "websocket/setYieldRateTable", payload:msgData.data})
|
||||
store.dispatch({ type: "websocket/setYieldRateTable", payload: msgData.data })
|
||||
return
|
||||
}
|
||||
if (msgData?.dateType === 'day') {
|
||||
store.dispatch({type: "websocket/setCutChartDay", payload:msgData.detData})
|
||||
store.dispatch({ type: "websocket/setCutChartDay", payload: msgData.detData })
|
||||
return
|
||||
}
|
||||
if (msgData?.dateType === 'weekly') {
|
||||
store.dispatch({type: "websocket/setCutChartWeek", payload:msgData.detData})
|
||||
store.dispatch({ type: "websocket/setCutChartWeek", payload: msgData.detData })
|
||||
return
|
||||
}
|
||||
if (msgData?.dateType === 'month') {
|
||||
store.dispatch({type: "websocket/setCutChartMonth", payload:msgData.detData})
|
||||
store.dispatch({ type: "websocket/setCutChartMonth", payload: msgData.detData })
|
||||
return
|
||||
}
|
||||
if (msgData?.dateType === 'year') {
|
||||
store.dispatch({type: "websocket/setCutChartYear", payload:msgData.detData})
|
||||
store.dispatch({ type: "websocket/setCutChartYear", payload: msgData.detData })
|
||||
return
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user