Compare commits

..

No commits in common. "d06784c2c3e55ee23f66d5c9467f74ea45291902" and "95b70b2415ddbc6814346c5d6ce1d1984b399f64" have entirely different histories.

42 changed files with 337 additions and 931 deletions

View File

@ -1,7 +1,7 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-01-11 10:20:21 # @LastEditTime: 2024-01-09 16:27:57
# @LastEditors: zhp # @LastEditors: zhp
# @Description: # @Description:
### ###
@ -21,17 +21,13 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.8:48082' # VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082' # VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082' # VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082' # VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# socket地址
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# dcs地址 # dcs地址
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081' VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# socket地址 # socket地址
# VUE_APP_Socket_API = 'ws://10.70.2.2:8080' VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
# VUE_APP_Socket_API = 'ws://192.168.0.33:48082' # VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://10.70.2.22:8080' VUE_APP_JIMU_API = 'http://10.70.2.22:8080'

View File

@ -7,11 +7,6 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/生产环境 # 芋道管理系统/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'
# dcs地址
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# socket地址
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.0.33:48082' VUE_APP_JIMU_API = 'http://192.168.0.33:48082'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

View File

@ -9,7 +9,7 @@ import store from './store';
import router from './router'; import router from './router';
import directive from './directive'; // directive import directive from './directive'; // directive
import plugins from './plugins'; // plugins import plugins from './plugins'; // plugins
import { scrollBoard } from '@jiaminghi/data-view' // import { scrollBoard } from '@jiaminghi/data-view'
import './assets/icons'; // icon import './assets/icons'; // icon
import './permission'; // permission control import './permission'; // permission control
@ -79,7 +79,7 @@ Vue.use(CodeBrickZj)
Vue.use(directive); Vue.use(directive);
Vue.use(plugins); Vue.use(plugins);
Vue.use(VueMeta); Vue.use(VueMeta);
Vue.use(scrollBoard) // Vue.use(scrollBoard)
// Vue.use(hljs.vuePlugin); // Vue.use(hljs.vuePlugin);
import scroll from 'vue-seamless-scroll' import scroll from 'vue-seamless-scroll'
Vue.use(scroll) Vue.use(scroll)

View File

@ -62,7 +62,7 @@ export default {
url, url,
method, method,
params: (method === 'get' || method === 'delete') ? payload : null, params: (method === 'get' || method === 'delete') ? payload : null,
data: (method === 'get' || method === 'delete') ? null : payload data: method !== 'get' ? payload : null,
}) })
}, },
put(payload) { put(payload) {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-01-11 15:54:50 * @LastEditTime: 2024-01-09 15:34:00
* @Description: * @Description:
--> -->
<template> <template>
@ -78,23 +78,23 @@
</base-container> </base-container>
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14">
<base-container :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'" :title-icon="'eqMonitoring'"> <base-container :height="318 + 338 + 16" :size="'middle'" :title="'设备状态监控'" :title-icon="'eqMonitoring'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
<!-- 像下面这样表格里的limit值也许可以用js动态计算出来 --> <!-- 像下面这样表格里的limit值也许可以用js动态计算出来 -->
<el-col :span="6" style=""> <el-col :span="6">
<div style="font-size:20px;margin: 5px 0 10px 0">融化风机</div> <h4 style="margin: 5px 0 5px 0;">融化风机</h4>
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun" <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun"
:table-data="funList" /> :table-data="funList" />
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div style="font-size:20px;margin: 5px 0 10px 0;">退火风机</div> <h4 style="margin: 5px 0 5px 0;">退火风机</h4>
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun" <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun"
:table-data="annealFunList" /> :table-data="annealFunList" />
</el-col> </el-col>
<el-col :span="12" style="float: right;"> <el-col :span="12" style="float: right;">
<div style="font-size:20px;margin: 5px 0 10px 0;">产线设备</div> <h4 style="margin: 5px 0 5px 0;">产线设备</h4>
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringProps" <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringProps"
:table-data="realEqList" /> :table-data="realEqList" />
</el-col> </el-col>
@ -668,27 +668,25 @@ export default {
width: 100%; width: 100%;
background: url('../../assets/img/OperationalOverview/title.png') no-repeat; background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
color: rgba(0, 255, 247, 1); color: #ffffff;
text-align: center; text-align: center;
.unit { .unit {
position: absolute; position: absolute;
left: 260px; left: 260px;
top: 25px; top: 25px;
color: rgba(255, 255, 255, 0.80);
font-size: 20px; font-size: 20px;
} }
.time { .time {
position: absolute; position: absolute;
left: 1360px; left: 1360px;
color: rgba(255, 255, 255, 0.80);
top: 25px; top: 25px;
font-size: 20px; font-size: 20px;
} }
.title-button { .title-button {
color: rgba(255, 255, 255, 0.80); color: #ffffff;
font-size: 20px; font-size: 20px;
position: absolute; position: absolute;
} }

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-01-19 15:58:17 * @Date: 2022-01-19 15:58:17
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-01-11 15:54:37 * @LastEditTime: 2024-01-08 16:03:05
* @Description: file content * @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue * @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
--> -->
@ -24,7 +24,7 @@
<div class="bar-item"> <div class="bar-item">
<div v-if="title" class="bar-title"> <div v-if="title" class="bar-title">
<span> <span>
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" /> <svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" />
{{ title }} {{ title }}
</span> </span>
</div> </div>
@ -129,10 +129,6 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
// background-position: 0 0; // background-position: 0 0;
} }
&__eqStatus {
background: url(../../../../assets/img/eqStatus.png) no-repeat;
background-size: 100% 100%;
}
// border-radius: 40px 0px 40px 0px; // 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; // border-image: linear-gradient(360deg, rgba(157, 246, 254, 0.05), rgba(100, 233, 252, 0.9)) 2 2;
// .line { // .line {
@ -196,12 +192,12 @@ export default {
.bar-title { .bar-title {
width: 100%; width: 100%;
color: #ffffff; color: #ffffff;
font-size: 24px; font-size: 1.6em;
padding: 0.67em; padding: 0.67em;
} }
.bar-content { .bar-content {
// padding: 1em; padding: 1em;
flex: 1 auto; flex: 1 auto;
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-09-21 09:06:28 * @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-01-11 15:52:09 * @LastEditTime: 2024-01-09 14:42:02
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -271,7 +271,7 @@ export default {
// show: true, // show: true,
// lineStyle: { // lineStyle: {
// color: colors[1] // color: colors[1]
// }jik078u7uut9890999999999999999999999999999999999999999999999999999999999999995u8 // }
// }, // },
} }
], ],

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-01-12 09:59:58 * @LastEditTime: 2024-01-08 16:06:49
* @Description: * @Description:
--> -->
<template> <template>
@ -30,10 +30,8 @@
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1" style="height: 50%;"> <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%"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
<base-container :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'"> <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" <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
:table-data="qualityYearList" /> :table-data="equipmentList" />
</base-container> </base-container>
</el-col> </el-col>
@ -41,8 +39,6 @@
<base-container :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'"> <base-container :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps" <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
:table-data="qualityMonthList" /> :table-data="qualityMonthList" />
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
:table-data="qualityMonthList" /> -->
</base-container> </base-container>
</el-col> </el-col>
@ -422,21 +418,21 @@ const qualityYearTableProps = [
] ]
const qualityYearList = [ const qualityYearList = [
{ name: '钢化炉', code: '21321312', status: '运行', error: '否' }, { eqName: '钢化炉', eqCode: '21321312', level: 1, content: 'Temperature high' },
{ name: '磨边机', code: '32323232', status: '运行', error: '否' }, { eqName: '磨边机', eqCode: '32323232', level: 4, content: 'Device warning/alarm' },
{ name: '镀膜机', code: '32213213', status: '运行', error: '否' }, { eqName: '镀膜机', eqCode: '32213213', level: 3, content: 'Temperature high' },
{ name: '钢化清洗机', code: '21321323', status: '运行', error: '否' }, { eqName: '钢化清洗机', eqCode: '21321323', level: 1, content: 'P030: JET: Note: Transportation subsequent machine is not running' },
{ name: '固化机', code: '21321321', status: '运行', error: '否' }, { eqName: '固化机', eqCode: '21321321', level: 2, content: 'P040' },
{ name: '磨边清洗机', code: '21321321', status: '运行', error: '否' }, { eqName: '磨边清洗机', eqCode: '21321321', level: 2, content: 'M4033.6' },
{ name: '预热机', code: '21321321', status: '故障', error: '是' }, { eqName: '预热机', eqCode: '21321321', level: 2, content: 'M4033.6' },
{ name: '下片机', code: '21321321', status: '运行', error: '否' }, { eqName: '下片机', eqCode: '21321321', level: 3, content: 'P040' },
{ {
name: '冷却机', code: '21321321', status: '运行', error: '否' }, eqName: '冷却机', eqCode: '21321321', level: 4, content: 'P0xx: Pos. number exhaust UVnumber: Reserve' },
{ {
name: 'A储片机106', code: '21321321', status: '运行', error: '否' }, eqName: 'A储片机106', eqCode: '21321321', level: 1, content: 'P0xx: Pos. number exhaust UVnumber: Reserve' },
{ name: '二次清洗机', code: '21321321', status: '运行', error: '否' }, { eqName: '二次清洗机', eqCode: '21321321', level: 2, content: 'Temperature high' },
{ name: '二次磨边机', code: '21321321', status: '故障', error: '是' }, { eqName: '二次磨边机', eqCode: '21321321', level: 2, content: 'Temperature high' },
{ name: '测试设备', code: '21321321', status: '运行', error: '否' } { eqName: '测试设备', eqCode: '21321321', level: 2, content: 'Temperature high' }
] ]
const qualityMonthTableProps = [ const qualityMonthTableProps = [
@ -457,50 +453,7 @@ const qualityMonthTableProps = [
label: '缺陷类型' label: '缺陷类型'
}, },
] ]
const qualityMonthList = [
{
productionLineName: 'Y61',
sectionName: '成型',
count: '199片',
inspectionTypeName: '细长泡'
},
{
productionLineName: 'Y62',
sectionName: '组合落板',
count: '123片',
inspectionTypeName: '细长泡'
},
{
productionLineName: 'Y61',
sectionName: '磨边',
count: '212片',
inspectionTypeName: '开口泡'
},
{
productionLineName: 'Y63',
sectionName: '清洗',
count: '33片',
inspectionTypeName: '结石'
},
{
productionLineName: 'Y64',
sectionName: '打孔',
count: '332片',
inspectionTypeName: '结石'
},
{
productionLineName: 'Y63',
sectionName: '成型',
count: '432片',
inspectionTypeName: '开口泡'
},
{
productionLineName: 'Y61',
sectionName: '上片',
count: '200片',
inspectionTypeName: '结石'
}
]
const orderProcessList = [ const orderProcessList = [
{ {
id: '1', outRate: '.8', name: '凯盛0322' id: '1', outRate: '.8', name: '凯盛0322'
@ -556,7 +509,7 @@ export default {
// orderProcessList: [], // orderProcessList: [],
orderProcessList, orderProcessList,
qualityTableProps1, qualityTableProps1,
qualityMonthList, qualityMonthList:[],
qualityMonthTableProps, qualityMonthTableProps,
modelMonth: '', modelMonth: '',
qualityList1, qualityList1,
@ -606,9 +559,6 @@ export default {
this.initWebSocket() this.initWebSocket()
this.SJGInitWebSocket() this.SJGInitWebSocket()
this.getTimes() this.getTimes()
this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
this.$refs.productLineChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], ['98', '97', '98.7', '98.5', '98.3',], ['4532', '1223', '3442', '4343', '2232'])
const _this = this; const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920 _this.beilv2 = document.documentElement.clientWidth / 1920
window.onresize = () => { window.onresize = () => {
@ -651,13 +601,13 @@ export default {
// console.log('11111', res); // console.log('11111', res);
this.productLineList = res.data this.productLineList = res.data
}) })
// this.$axios.get( this.$axios.get(
// 'base/quality-inspection-record/dayStatistics', 'base/quality-inspection-record/dayStatistics',
// 'get', 'get',
// ).then((res) => { ).then((res) => {
// // console.log('11111', res); // console.log('11111', res);
// this.qualityMonthList = res.data ? res.data : [] this.qualityMonthList = res.data ? res.data : []
// }) })
}, },
getTimes() { getTimes() {
setInterval(this.getTimesInterval, 1000); setInterval(this.getTimesInterval, 1000);
@ -791,7 +741,7 @@ export default {
// console.log(this.EnergyMonitoringNameList) // console.log(this.EnergyMonitoringNameList)
// console.log(this.EnergyMonitoringList) // console.log(this.EnergyMonitoringList)
// this.$nextTick(() => { // this.$nextTick(() => {
// this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList) this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList)
} }
}, },
// //
@ -839,7 +789,7 @@ export default {
// console.log(this.EnergyMonitoringNameList) // console.log(this.EnergyMonitoringNameList)
// console.log(this.EnergyMonitoringList) // console.log(this.EnergyMonitoringList)
// this.$nextTick(() => { // this.$nextTick(() => {
// this.$refs.EnergyMonitoringChart.initChart(this.EnergyMonitoringNameList, this.EnergyMonitoringList) this.$refs.EnergyMonitoringChart.initChart(this.EnergyMonitoringNameList, this.EnergyMonitoringList)
// }) // })
} }
}, },

View File

@ -1,266 +0,0 @@
<!--
filename: dialogForm.vue
author: liubin
date: 2023-09-11 15:55:13
description: DialogForm for equipmentBindSection only
-->
<template>
<el-form
ref="form"
:model="dataForm"
label-width="128px"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="产线"
prop="productionLineId"
:rules="[
{ required: true, message: '产线不能为空', trigger: 'blur' },
]">
<el-select
v-model="dataForm.productionLineId"
placeholder="请选择产线"
filterable
clearable
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="工段"
prop="workshopSectionId"
:rules="[
{ required: true, message: '工段不能为空', trigger: 'blur' },
]">
<el-select
v-model="dataForm.workshopSectionId"
filterable
clearable
placeholder="请选择工段"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in worksectionList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="设备"
prop="equipmentId"
clearable
filterable
:rules="[
{ required: true, message: '设备不能为空', trigger: 'blur' },
]">
<el-select
v-model="dataForm.equipmentId"
filterable
placeholder="请选择设备"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in equipmentList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="工段排序"
prop="sort"
:rules="[
{
type: 'number',
trigger: 'change',
message: '请输入正确的数字类型',
transform: (val) => Number(val),
},
]">
<el-input
v-model="dataForm.sort"
clearable
@change="$emit('update', dataForm)"
placeholder="请输入工段排序" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="产线统计类型"
prop="lineDataType"
:rules="[
{
required: true,
message: '产线统计类型不能为空',
trigger: 'change',
},
]">
<el-select
v-model="dataForm.lineDataType"
placeholder="请选择产线统计类型"
clearable
filterable
@change="$emit('update', dataForm)">
<el-option
v-for="opt in [
{ label: '无类型', value: 0 },
{ label: '进口统计', value: 1 },
{ label: '出口统计', value: 2 },
]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="工段统计类型"
prop="sectionDataType"
:rules="[
{
required: true,
message: '工段统计类型不能为空',
trigger: 'change',
},
]">
<el-select
v-model="dataForm.sectionDataType"
placeholder="请选择工段统计类型"
clearable
filterable
@change="$emit('update', dataForm)">
<el-option
v-for="opt in [
{ label: '无类型', value: 0 },
{ label: '进口统计', value: 1 },
{ label: '出口统计', value: 2 },
]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
export default {
name: 'DialogForm',
model: {
prop: 'dataForm',
event: 'update',
},
emits: ['update'],
components: {},
props: {
dataForm: {
type: Object,
default: () => ({}),
},
},
data() {
return {
formLoading: true,
productionLineList: [],
equipmentList: [],
worksectionList: [],
dataFormCache: null,
};
},
mounted() {
Promise.all([this.getProductLineList(), this.getEquipmentList()]).then(
() => {
this.formLoading = false;
}
);
},
watch: {
'dataForm.productionLineId': {
handler: async function (plId) {
if (plId) await this.getWorksectionList(plId);
},
immediate: true,
},
},
methods: {
/** 模拟透传 ref */
validate(cb) {
return this.$refs.form.validate(cb);
},
resetFields(args) {
return this.$refs.form.resetFields(args);
},
async handleProductlineChange(id) {
await this.getWorksectionList(id);
this.dataForm.workshopSectionId = null;
this.$emit('update', this.dataForm);
},
// getCode
async getCode(url) {
const response = await this.$axios(url);
return response.data;
},
// 线
async getProductLineList() {
const response = await this.$axios('/base/core-production-line/listAll');
this.productionLineList = response.data.map((item) => ({
label: item.name,
value: item.id,
}));
},
//
async getEquipmentList() {
const response = await this.$axios(
// '/base/core-equipment/page?pageNo=1&pageSize=100'
'/base/core-equipment/listAll'
);
this.equipmentList = response.data.map((item) => ({
label: item.name,
value: item.id,
}));
},
//
async getWorksectionList(plId) {
const response = await this.$axios(
'/base/core-workshop-section/listByParentId',
{
params: {
id: plId,
},
}
);
this.worksectionList = response.data.map((item) => ({
label: item.name,
value: item.id,
}));
},
},
};
</script>
<style scoped lang="scss">
.el-date-editor,
.el-select {
width: 100%;
}
</style>

View File

@ -50,13 +50,12 @@
<script> <script>
import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import DialogForm from './dialogForm.vue';
// import { getAccessToken } from '@/utils/auth'; // import { getAccessToken } from '@/utils/auth';
export default { export default {
name: 'EquipmentLineBind', name: 'EquipmentLineBind',
components: { DialogForm }, components: {},
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
@ -150,9 +149,7 @@ export default {
select: true, select: true,
label: '产线', label: '产线',
prop: 'productionLineId', prop: 'productionLineId',
rules: [ rules: [{ required: true, message: '产线名不能为空', trigger: 'blur' }],
{ required: true, message: '产线名不能为空', trigger: 'blur' },
],
url: '/base/core-production-line/listAll', url: '/base/core-production-line/listAll',
bind: { clearable: true, filterable: true }, bind: { clearable: true, filterable: true },
// watch: 'workshopSectionId' // watch: 'workshopSectionId'
@ -162,9 +159,7 @@ export default {
label: '工段', label: '工段',
prop: 'workshopSectionId', prop: 'workshopSectionId',
depends: 'productionLineId', depends: 'productionLineId',
rules: [ rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
{ required: true, message: '工段不能为空', trigger: 'blur' },
],
bind: { clearable: true, filterable: true }, bind: { clearable: true, filterable: true },
url: '/base/core-workshop-section/listByParentId', url: '/base/core-workshop-section/listByParentId',
}, },
@ -174,9 +169,7 @@ export default {
select: true, select: true,
label: '设备', label: '设备',
prop: 'equipmentId', prop: 'equipmentId',
rules: [ rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
{ required: true, message: '设备名不能为空', trigger: 'blur' },
],
bind: { clearable: true, filterable: true }, bind: { clearable: true, filterable: true },
url: '/base/core-equipment/listAll', url: '/base/core-equipment/listAll',
}, },
@ -197,16 +190,9 @@ export default {
label: '产线统计类型', label: '产线统计类型',
prop: 'lineDataType', prop: 'lineDataType',
bind: { bind: {
clearable: true, clearable: true, filterable: true
filterable: true,
}, },
rules: [ rules: [{ required: true, message: '产线统计类型不能为空', trigger: 'change' }],
{
required: true,
message: '产线统计类型不能为空',
trigger: 'change',
},
],
}, },
{ {
select: true, select: true,
@ -218,16 +204,9 @@ export default {
label: '工段统计类型', label: '工段统计类型',
prop: 'sectionDataType', prop: 'sectionDataType',
bind: { bind: {
clearable: true, clearable: true, filterable: true
filterable: true,
}, },
rules: [ rules: [{ required: true, message: '工段统计类型不能为空', trigger: 'change' }],
{
required: true,
message: '工段统计类型不能为空',
trigger: 'change',
},
],
}, },
], ],
], ],
@ -356,21 +335,15 @@ export default {
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal this.$modal
.confirm( .confirm('是否确认删除绑定"' + row.name + '"?')
'是否确认删除绑定"' + .then(function () {
(row.equipmentName == null ? '这条记录' : row.equipmentName) + return deleteEquipmentType(id);
'"?'
)
.then(() => {
return this.del({ id });
}) })
.then(() => { .then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess('删除成功'); this.$modal.msgSuccess('删除成功');
}) })
.catch((err) => { .catch(() => {});
console.error(err);
});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {

View File

@ -16,9 +16,7 @@
<el-form-item <el-form-item
label="产线" label="产线"
prop="productionLineId" prop="productionLineId"
:rules="[ :rules="[{ required: true, message: '产线不能为空', trigger: 'blur' }]">
{ required: true, message: '产线不能为空', trigger: 'blur' },
]">
<el-select <el-select
v-model="dataForm.productionLineId" v-model="dataForm.productionLineId"
placeholder="请选择产线" placeholder="请选择产线"
@ -37,9 +35,7 @@
<el-form-item <el-form-item
label="工段" label="工段"
prop="workshopSectionId" prop="workshopSectionId"
:rules="[ :rules="[{ required: true, message: '工段不能为空', trigger: 'blur' }]">
{ required: true, message: '工段不能为空', trigger: 'blur' },
]">
<el-select <el-select
v-model="dataForm.workshopSectionId" v-model="dataForm.workshopSectionId"
filterable filterable
@ -59,9 +55,7 @@
<el-form-item <el-form-item
label="设备" label="设备"
prop="equipmentId" prop="equipmentId"
:rules="[ :rules="[{ required: true, message: '设备不能为空', trigger: 'blur' }]">
{ required: true, message: '设备不能为空', trigger: 'blur' },
]">
<el-select <el-select
v-model="dataForm.equipmentId" v-model="dataForm.equipmentId"
filterable filterable

View File

@ -1,8 +1,8 @@
/* /*
* @Author: zwq * @Author: zwq
* @Date: 2022-08-24 11:19:43 * @Date: 2022-08-24 11:19:43
* @LastEditors: zhp * @LastEditors: DY
* @LastEditTime: 2024-01-10 10:29:29 * @LastEditTime: 2023-09-21 16:02:07
* @Description: * @Description:
*/ */
export default { export default {
@ -92,7 +92,7 @@ export default {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "delete") { } else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data) this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
} else if (val.type === "change") { } else if (val.type === "change") {
this.changeStatus(val.data.id) this.changeStatus(val.data.id)
} else { } else {

View File

@ -1,25 +1,19 @@
<template> <template>
<div> <div class="defect-chart"></div>
<NotMsg v-show="notMsg"/>
<div id="defectChart" style="width:600px;height:238px;" v-show="!notMsg"></div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import resize from './../mixins/resize' import resize from './../mixins/resize'
import NotMsg from './../components/NotMsg'
export default { export default {
name: 'DefectChart', name: 'DefectChart',
mixins: [resize], mixins: [resize],
components:{ NotMsg },
props: { props: {
chartTime: '' chartTime: ''
}, },
data() { data() {
return { return {
chart: null, chart: null,
tempData: [], tempData: []
notMsg:false
} }
}, },
computed: { computed: {
@ -71,26 +65,6 @@ export default {
this.updateChart() this.updateChart()
} }
} }
},
chartTime: {//
handler(newVal, oldVal) {
switch(this.chartTime){
case '日':
this.tempData = this.israDayStatistic
break;
case '周':
this.tempData = this.israWeekStatistic
break;
case '月':
this.tempData = this.israMonthStatistic
break;
case '年':
this.tempData = this.israYearStatistic
break;
default:
}
this.updateChart()
}
} }
}, },
mounted() { mounted() {
@ -101,12 +75,6 @@ export default {
}, },
methods: { methods: {
updateChart() { updateChart() {
if (!this.tempData || this.tempData.length == 0) {
this.notMsg = true
return
} else {
this.notMsg = false
}
if ( if (
this.chart !== null && this.chart !== null &&
this.chart !== '' && this.chart !== '' &&
@ -114,7 +82,7 @@ export default {
) { ) {
this.chart.dispose() this.chart.dispose()
} }
this.chart = echarts.init(document.getElementById('defectChart')); this.chart = echarts.init(this.$el);
let xData = [] let xData = []
let seriesData = [] let seriesData = []
for (let i = 0;i < this.israCheckType.length; i++) { for (let i = 0;i < this.israCheckType.length; i++) {
@ -127,25 +95,12 @@ export default {
obj.name = this.israCheckType[i] obj.name = this.israCheckType[i]
obj.barWidth = 12 obj.barWidth = 12
obj.data = [] obj.data = []
if (i === this.israCheckType.length-1) {
obj.label = {
show: true,
position: 'top',
color: "#fffc",
formatter: (params)=>this.tempData[params.dataIndex].sum
}
}
for (let j = 0;j < this.tempData.length; j++) { for (let j = 0;j < this.tempData.length; j++) {
let num = 0
for (let k = 0; k < this.tempData[j].data.length; k++) { for (let k = 0; k < this.tempData[j].data.length; k++) {
if (this.israCheckType[i] === this.tempData[j].data[k].checkType) { if (this.israCheckType[i] === this.tempData[j].data[k].checkType) {
obj.data.push(this.tempData[j].data[k].checkNum) obj.data.push(this.tempData[j].data[k].checkNum)
num++
} }
} }
if (num === 0) {
obj.data.push(0)
}
} }
seriesData.push(obj) seriesData.push(obj)
} }
@ -155,10 +110,10 @@ export default {
}) })
var option = { var option = {
color: ["#2760FF", "#8167F6", "#5B9BFF", "#99D66C", "#FFD160", "#FF8A40"], color: ["#2760FF", "#8167F6", "#5B9BFF", "#99D66C", "#FFD160", "#FF8A40"],
grid: { top: 90, right: 12, bottom: 20, left: 70 }, grid: { top: 80, right: 12, bottom: 20, left: 48 },
legend: { legend: {
top: 0, top: 10,
left: 100, left: 80,
padding: 5, padding: 5,
itemWidth: 12, itemWidth: 12,
itemHeight: 12, itemHeight: 12,
@ -224,6 +179,12 @@ export default {
} }
} }
</script> </script>
<style scoped lang="scss">
.defect-chart {
width: 100%;
height: 100%;
}
</style>
<style> <style>
.defect-chart-tooltip { .defect-chart-tooltip {
background: #0a2b4f77 !important; background: #0a2b4f77 !important;

View File

@ -1,24 +1,18 @@
<template> <template>
<div> <div class="defect-class-chart"></div>
<NotMsg v-show="notMsg"/>
<div id="defectClassChart" class="defect-class-chart" style="width:600px;height:390px;" v-show='!notMsg'></div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import resize from './../mixins/resize' import resize from './../mixins/resize'
import NotMsg from './../components/NotMsg'
export default { export default {
name: 'DefectClassChart', name: 'DefectClassChart',
mixins: [resize], mixins: [resize],
components:{ NotMsg },
props: { props: {
chartType: '' chartType: ''
}, },
data() { data() {
return { return {
chart: null, chart: null
notMsg:false
} }
}, },
computed: { computed: {
@ -49,12 +43,6 @@ export default {
}, },
methods: { methods: {
updateChart() { updateChart() {
if (!this.israDayStatistic || this.israDayStatistic.length == 0) {
this.notMsg = true
return
} else {
this.notMsg = false
}
if ( if (
this.chart !== null && this.chart !== null &&
this.chart !== '' && this.chart !== '' &&
@ -62,7 +50,7 @@ export default {
) { ) {
this.chart.dispose() this.chart.dispose()
} }
this.chart = echarts.init(document.getElementById('defectClassChart')); this.chart = echarts.init(this.$el);
let tempData = [] let tempData = []
let xData = [] let xData = []
let yData = [] let yData = []
@ -78,14 +66,28 @@ export default {
}) })
var option = { var option = {
color: ['#2760FF','#5B9BFF','#FFD160','#8167F6', '#99D66C', '#FF8A40'], color: ['#2760FF','#5B9BFF','#FFD160','#8167F6', '#99D66C', '#FF8A40'],
grid: { top: 40, right: 12, bottom: 65, left: 70 }, grid: { top: 40, right: 12, bottom: 80, left: 60 },
// legend: {
// top: 10,
// left: 80,
// padding: 5,
// itemWidth: 12,
// itemHeight: 12,
// itemGap: 12,
// height: 12,
// textStyle: {
// color: "#DFF1FE",
// fontSize: 12,
// },
// data:['a','b','c','d','e'],
// },
xAxis: { xAxis: {
type: "category", type: "category",
data: xData, data: xData,
axisLabel: { axisLabel: {
color: "#fffc", color: "#fffc",
fontSize: 12, fontSize: 12,
rotate: 25 rotate: 45
}, },
axisTick: { show: false }, axisTick: { show: false },
axisLine: { axisLine: {
@ -96,7 +98,7 @@ export default {
}, },
}, },
yAxis: { yAxis: {
name: "单位/", name: "单位/",
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "#fff",
fontSize: 10, fontSize: 10,
@ -134,9 +136,7 @@ export default {
barWidth: 12, barWidth: 12,
label: { label: {
show: true, show: true,
position: 'top', position: 'top'
distance: 10,
color: "#fffc"
}, },
itemStyle: { itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [

View File

@ -1,21 +1,15 @@
<template> <template>
<div> <div class="energe-monitoring-chart"></div>
<NotMsg v-show="notMsg"/>
<div id="energeMonitoringChart" class="energe-monitoring-chart" style="width:575px;height:370px;" v-show='!notMsg'></div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import resize from './../mixins/resize' import resize from './../mixins/resize'
import NotMsg from './../components/NotMsg'
export default { export default {
name: 'EnergeMonitoringChart', name: 'EnergeMonitoringChart',
mixins: [resize], mixins: [resize],
components:{ NotMsg },
data() { data() {
return { return {
chart: null, chart: null
notMsg:true
} }
}, },
computed: { computed: {
@ -48,22 +42,16 @@ export default {
) { ) {
this.chart.dispose() this.chart.dispose()
} }
this.chart = echarts.init(document.getElementById('energeMonitoringChart')); this.chart = echarts.init(this.$el);
let xData = [] let xData = []
let yData = [] let yData = []
this.energyMonitoring && this.energyMonitoring.length > 0 && this.energyMonitoring.map(item => { this.energyMonitoring && this.energyMonitoring.length > 0 && this.energyMonitoring.map(item => {
xData.push(item.lineName) xData.push(item.lineName)
yData.push(item.useQuantity) yData.push(item.useQuantity)
}) })
if (yData.length === 0) { var option = option = {
this.notMsg = true
return
} else {
this.notMsg = false
}
var option = {
// color: ['#FF8A40','#FFD160','#99D66C','#5B9BFF','#8167F6','#2760FF'], // color: ['#FF8A40','#FFD160','#99D66C','#5B9BFF','#8167F6','#2760FF'],
grid: { top: 32, right: 12, bottom: 20, left: 90 }, grid: { top: 32, right: 12, bottom: 20, left: 60 },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
@ -103,13 +91,11 @@ export default {
], ],
yAxis: [ yAxis: [
{ {
name: '单位kwh',
nameTextStyle: {
color: '#fff',
fontSize: 10,
align: 'right',
},
type: 'value', type: 'value',
name: '单位',
// min: 0,
// max: 250,
// interval: 50,
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 12, fontSize: 12,
@ -135,7 +121,7 @@ export default {
barWidth: 20, barWidth: 20,
tooltip: { tooltip: {
valueFormatter: function (value) { valueFormatter: function (value) {
return value; return value + ' ml';
} }
}, },
itemStyle: { itemStyle: {

View File

@ -1,19 +1,15 @@
<template> <template>
<div> <div class="gas-chart"></div>
<NotMsg v-show="notMsg"/>
<div id='flueGasChart' class="flue-gas-chart" style="width:600px;height:250px;" v-show='!notMsg'></div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import resize from './../mixins/resize' import resize from './../mixins/resize'
import NotMsg from './../components/NotMsg'
export default { export default {
name: 'FlueGasChart', name: 'GasChart',
mixins: [resize], mixins: [resize],
components:{ NotMsg }, components: {},
props: { props: {
chartType: '', chartType: '',
chartTime: '' chartTime: ''
@ -30,8 +26,7 @@ export default {
'#2aa1ff', '#2aa1ff',
]; ];
return { return {
chart: null, chart: null
notMsg:false
}; };
}, },
computed: { computed: {
@ -131,7 +126,7 @@ export default {
temp2 = temp1?.SO2_float || [] temp2 = temp1?.SO2_float || []
break; break;
} }
case '氮氧化物':{ case '一氧化氮':{
temp2 = temp1?.NOX_float || [] temp2 = temp1?.NOX_float || []
break; break;
} }
@ -141,13 +136,7 @@ export default {
} }
default: default:
} }
if (temp2.length === 0) { temp2.length > 0 && temp2.map(i => {
this.notMsg = true
return
} else {
this.notMsg = false
}
temp2.map(i => {
xData.push(i.time) xData.push(i.time)
yData.push(i.value) yData.push(i.value)
}) })
@ -183,10 +172,10 @@ export default {
) { ) {
this.chart.dispose() // Dom this.chart.dispose() // Dom
} }
this.chart = echarts.init(document.getElementById('flueGasChart')); this.chart = echarts.init(this.$el);
var option = { var option = {
color: colors, color: colors,
grid: { top: 32, right: 12, bottom: 20, left: 60 }, grid: { top: 32, right: 12, bottom: 20, left: 48 },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: xData, data: xData,
@ -203,7 +192,7 @@ export default {
}, },
}, },
yAxis: { yAxis: {
name: this.chartType === '氧气含量' ? '单位%':'单位mg/m³', name: '单位/h',
nameTextStyle: { nameTextStyle: {
color: '#fff', color: '#fff',
fontSize: 10, fontSize: 10,
@ -229,7 +218,6 @@ export default {
series: seriesData, series: seriesData,
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
className: "gas-chart-tooltip"
}, },
} }
option && this.chart.setOption(option) option && this.chart.setOption(option)
@ -239,18 +227,8 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.flue-gas-chart { .gas-chart {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
</style> </style>
<style>
.gas-chart-tooltip {
background: #0a2b4f77 !important;
border: none !important;
backdrop-filter: blur(12px);
}
.gas-chart-tooltip * {
color: #fff !important;
}
</style>

View File

@ -1,19 +1,22 @@
<!--
filename: GasChart.vue
author: liubin
date: 2023-12-12 10:53:49
description:
-->
<template> <template>
<div> <div class="gas-chart"></div>
<NotMsg v-show="notMsg"/>
<div id='gasChart' class="gas-chart" style="width:600px;height:200px;" v-show='!notMsg'></div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import resize from './../mixins/resize' import resize from './../mixins/resize'
import NotMsg from './../components/NotMsg'
export default { export default {
name: 'GasChart', name: 'GasChart',
mixins: [resize], mixins: [resize],
components:{ NotMsg }, components: {},
props: { props: {
chartType: '', // chartType: '', //
chartTime: '' chartTime: ''
@ -30,8 +33,7 @@ export default {
'#2aa1ff', '#2aa1ff',
]; ];
return { return {
chart: null, chart: null
notMsg:false
}; };
}, },
computed: { computed: {
@ -141,12 +143,6 @@ export default {
} }
xData = this.getXdata() xData = this.getXdata()
} }
if (yData.length === 0) {
this.notMsg = true
return
} else {
this.notMsg = false
}
if (yData.length == 0) { if (yData.length == 0) {
seriesData = [] seriesData = []
}else { }else {
@ -179,7 +175,7 @@ export default {
) { ) {
this.chart.dispose() // Dom this.chart.dispose() // Dom
} }
this.chart = echarts.init(document.getElementById('gasChart')); this.chart = echarts.init(this.$el);
var option = { var option = {
color: colors, color: colors,
grid: { top: 32, right: 12, bottom: 20, left: 60 }, grid: { top: 32, right: 12, bottom: 20, left: 60 },
@ -199,7 +195,7 @@ export default {
}, },
}, },
yAxis: { yAxis: {
name: this.chartType === '电耗能'?'单位kwh':'单位Nm³', name: '单位/h',
nameTextStyle: { nameTextStyle: {
color: '#fff', color: '#fff',
fontSize: 10, fontSize: 10,

View File

@ -1,28 +1,56 @@
<template> <template>
<div> <div class="isra-chart"></div>
<NotMsg v-show="notMsg"/>
<div id="israChart" class="isra-chart" style="width:600px;height:390px;" v-show='!notMsg'></div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import resize from './../mixins/resize' import resize from './../mixins/resize'
import NotMsg from './../components/NotMsg'
export default { export default {
name: 'ISRAChart', name: 'ISRAChart',
mixins: [resize], mixins: [resize],
components:{ NotMsg }, components: {},
props: {}, props: {},
data() { data() {
return { return {
chart: null, chart: null,
notMsg:true,
colors:['#2760ff', '#518eec', '#0ee8e4', '#ddb523'], colors:['#2760ff', '#518eec', '#0ee8e4', '#ddb523'],
chartData: [] chartData: [],
option: {
tooltip: {
trigger: 'item',
},
legend: {
bottom: '3%',
left: 'center',
icon: 'circle',
textStyle: {
color: '#fff'
}
},
title: {
text: 0,
subtext: '总数',
top: '43%',
left: '49%',
textAlign: 'center',
textStyle: {
fontSize: 32,
lineHeight: 16,
color: '#fff',
},
subtextStyle: {
fontSize: 16,
color: '#fff00',
},
},
series: []
},
}; };
}, },
mounted() {
this.initChart();
},
activated() { activated() {
}, },
computed: { computed: {
@ -33,33 +61,23 @@ export default {
watch: { watch: {
israChartMsg: { israChartMsg: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
this.chartData = newVal || [] this.chartData = newVal
this.updateChart() this.updateChart()
} }
} }
}, },
methods: { methods: {
initChart() {
this.chart = echarts.init(this.$el);
this.chart.setOption(this.option);
},
updateChart() { updateChart() {
console.log('update') console.log('update')
let num = 0 let num = 0
this.chartData && this.chartData.length > 0 && this.chartData.map(i => { this.chartData && this.chartData.length > 0 && this.chartData.map(i => {
num+=i.num num+=i.num
}) })
if ( this.chart.setOption({
this.chart !== null &&
this.chart !== '' &&
this.chart !== undefined
) {
this.chart.dispose()
}
if (this.chartData && this.chartData.length > 0) {
this.notMsg = false
} else {
this.notMsg = true
return
}
this.chart = echarts.init(document.getElementById('israChart'));
var option = {
title:{ title:{
text: num, text: num,
subtext: '总数', subtext: '总数',
@ -76,14 +94,6 @@ export default {
color: '#fff00', color: '#fff00',
}, },
}, },
legend: {
bottom: '3%',
left: 'center',
icon: 'circle',
textStyle: {
color: '#fff'
}
},
series:[{ series:[{
name: 'ISRA缺陷检测', name: 'ISRA缺陷检测',
type: 'pie', type: 'pie',
@ -116,13 +126,8 @@ export default {
] ]
} }
} }
}))}], }))}]
tooltip: { })
trigger: 'item',
className: "isra-chart-tooltip"
},
}
this.chart.setOption(option);
} }
}, },
}; };
@ -134,13 +139,3 @@ export default {
height: 100%; height: 100%;
} }
</style> </style>
<style>
.isra-chart-tooltip {
background: #0a2b4f77 !important;
border: none !important;
backdrop-filter: blur(12px);
}
.isra-chart-tooltip * {
color: #fff !important;
}
</style>

View File

@ -1,27 +0,0 @@
<template>
<div class="notmsg">暂无数据</div>
</template>
<script>
export default {
name: 'NotMsg',
components: {},
data() {
return {
};
},
computed: {
},
methods: {
},
};
</script>
<style scoped lang="scss">
.notmsg {
padding-top: 72px;
color: rgba(255, 255, 255, 0.4);
text-align: center;
font-size: 24px;
}
</style>

View File

@ -1,21 +1,15 @@
<template> <template>
<div> <div class="num-rate-chart"></div>
<NotMsg v-show="notMsg"/>
<div id="numRateChart" class="num-rate-chart" style="width:900px;height:370px;" v-show='!notMsg'></div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import resize from './../mixins/resize' import resize from './../mixins/resize'
import NotMsg from './../components/NotMsg'
export default { export default {
name: 'NumRateChart', name: 'NumRateChart',
mixins: [resize], mixins: [resize],
components:{ NotMsg },
data() { data() {
return { return {
chart: null, chart: null
notMsg:true
} }
}, },
computed: { computed: {
@ -29,7 +23,7 @@ export default {
if (newVal === oldVal) { if (newVal === oldVal) {
return false return false
} }
// this.updateChart() this.updateChart()
} }
} }
}, },
@ -37,16 +31,18 @@ export default {
this.$el.addEventListener('resize', () => { this.$el.addEventListener('resize', () => {
console.log('resziing.....'); console.log('resziing.....');
}); });
this.updateChart() this.updateChart()
}, },
methods: { methods: {
updateChart() { updateChart() {
if (this.productline && this.productline.length > 0) { if (
this.notMsg = false this.chart !== null &&
} else { this.chart !== '' &&
this.notMsg = true this.chart !== undefined
return ) {
this.chart.dispose()
} }
this.chart = echarts.init(this.$el);
let xData = [] let xData = []
let outputNum = [] let outputNum = []
let passRate = [] let passRate = []
@ -55,14 +51,6 @@ export default {
outputNum.push(item.outputNum) outputNum.push(item.outputNum)
passRate.push(item.passRate*100) passRate.push(item.passRate*100)
}) })
if (
this.chart !== null &&
this.chart !== '' &&
this.chart !== undefined
) {
this.chart.dispose()
}
this.chart = echarts.init(document.getElementById('numRateChart'));
var option = { var option = {
grid: { top: 32, right: 60, bottom: 20, left: 60 }, grid: { top: 32, right: 60, bottom: 20, left: 60 },
tooltip: { tooltip: {
@ -73,7 +61,7 @@ export default {
className: "num-rate-chart-tooltip" className: "num-rate-chart-tooltip"
}, },
legend: { legend: {
data: ['产线产量', '良品率'], data: ['产线产量', '合格率'],
textStyle: { textStyle: {
color: "#DFF1FE", color: "#DFF1FE",
fontSize: 12, fontSize: 12,
@ -103,11 +91,6 @@ export default {
{ {
type: 'value', type: 'value',
name: '产量/片', name: '产量/片',
nameTextStyle: {
color: '#fff',
fontSize: 10,
align: 'right',
},
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 12, fontSize: 12,
@ -128,11 +111,6 @@ export default {
{ {
type: 'value', type: 'value',
name: '良品率', name: '良品率',
nameTextStyle: {
color: '#fff',
fontSize: 10,
align: 'LEFT',
},
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 12, fontSize: 12,
@ -170,7 +148,7 @@ export default {
data: outputNum data: outputNum
}, },
{ {
name: '良品率', name: '合格率',
type: 'line', type: 'line',
yAxisIndex: 1, yAxisIndex: 1,
tooltip: { tooltip: {

View File

@ -49,18 +49,16 @@ export default {
.switcher { .switcher {
:deep(.el-switch__core) { :deep(.el-switch__core) {
border: none; border: none;
background-color:#02457e; background-color:rgba(3, 35, 60, 1);
height: 18px;
&::after { &::after {
background-color: #03233c; background-color: #02457e;
} }
} }
:deep(.is-checked) { :deep(.is-checked) {
.el-switch__core { .el-switch__core {
border: none; border: none;
height: 18px;
background-color: rgba(180, 255, 252, 0.71); background-color: rgba(180, 255, 252, 0.71);
&::after { &::after {

View File

@ -65,6 +65,8 @@ export default {
}, },
chartTime: { chartTime: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log("===================")
console.log(newVal)
this.updateChart() this.updateChart()
} }
}, },
@ -109,14 +111,14 @@ export default {
}else{ }else{
xData.push((item.dataTime).slice(0,10)) xData.push((item.dataTime).slice(0,10))
} }
dayArr.push(item.day?(item.day * 100).toFixed(2):null) dayArr.push((item.day * 100).toFixed(2))
nightArr.push(item.night?(item.night * 100).toFixed(2):null) nightArr.push((item.night * 100).toFixed(2))
sumArr.push(item.sum?(item.sum * 100).toFixed(2):null) sumArr.push((item.sum * 100).toFixed(2))
}) })
if (this.chartType) { if (this.chartType) {
seriesData = [{ seriesData = [{
color: '#ff9e00', color: '#ff9e00',
name: '总量', name: 'sum',
data: sumArr, data: sumArr,
type: "line", type: "line",
areaStyle: { areaStyle: {
@ -136,7 +138,7 @@ export default {
}, },
{ {
color: '#08d8cd', color: '#08d8cd',
name: '白班', name: 'day',
data: dayArr, data: dayArr,
type: "line", type: "line",
areaStyle: { areaStyle: {
@ -156,7 +158,7 @@ export default {
}, },
{ {
color: '#0b58ff', color: '#0b58ff',
name: '夜班', name: 'night',
data: nightArr, data: nightArr,
type: "line", type: "line",
areaStyle: { areaStyle: {
@ -177,7 +179,7 @@ export default {
}else{ }else{
seriesData = [{ seriesData = [{
color: '#ff9e00', color: '#ff9e00',
name: '总量', name: 'sum',
data: sumArr, data: sumArr,
type: "line", type: "line",
areaStyle: { areaStyle: {

View File

@ -8,7 +8,7 @@
display: grid; display: grid;
grid-template-rows: 462px; grid-template-rows: 462px;
"> ">
<WorkOrderMonitoring /> <EnergyMonitoring />
</div> </div>
</div> </div>
<div class="right-side" style="flex: 1"> <div class="right-side" style="flex: 1">
@ -25,10 +25,10 @@
<script> <script>
import NumRate from './NumRate'; import NumRate from './NumRate';
import WorkOrderMonitoring from './WorkOrderMonitoring'; import EnergyMonitoring from './EnergyMonitoring';
export default { export default {
name: 'BottomTwo', name: 'BottomTwo',
components: { NumRate, WorkOrderMonitoring }, components: { NumRate, EnergyMonitoring },
props: {}, props: {},
data() { data() {
return {}; return {};

View File

@ -1,6 +1,6 @@
<template> <template>
<div style="flex: 1;"> <div style="flex: 1;">
<Container name="各工序缺陷汇总" size="middle" style=""> <Container name="各工序缺陷汇总" size="small" style="">
<div style="padding: 5px 10px;"> <div style="padding: 5px 10px;">
<dv-scroll-board :config="config" style="width:575px;height:380px" ref='defectScrollBoard'/> <dv-scroll-board :config="config" style="width:575px;height:380px" ref='defectScrollBoard'/>
</div> </div>
@ -21,12 +21,13 @@ export default {
return { return {
config: { config: {
header: ['序号', '产线', '工序','损耗片数','缺陷类型'], header: ['序号', '产线', '工序','损耗片数','缺陷类型'],
// headerHeight: '17',
headerBGC: 'rgba(32, 55, 96, 0.8)', headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)', oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)', evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60], columnWidth: [60],
align: ['center'], align: ['center'],
data: [[1, 'Y61', '破损','10','气泡']], data: [],
rowNum: 10 rowNum: 10
} }
} }

View File

@ -1,9 +1,11 @@
<template> <template>
<Container name="能源监控" size="large" style=""> <div style="flex: 1;">
<div class="chart" style="height: 370px; margin-top: 8px;"> <Container name="能源监控" size="small" style="">
<EnergeMonitoringChart/> <div class="chart" style="height: 370px; margin-top: 8px;">
</div> <EnergeMonitoringChart/>
</Container> </div>
</Container>
</div>
</template> </template>
<script> <script>
import Container from '../components/Container.vue'; import Container from '../components/Container.vue';

View File

@ -1,6 +1,6 @@
<template> <template>
<div style="flex: 1;"> <div style="flex: 1;">
<Container name="设备报警" size="middle" style=""> <Container name="设备报警" size="small" style="">
<div style="padding: 5px 10px;"> <div style="padding: 5px 10px;">
<dv-scroll-board :config="config" style="width:575px;height:380px" ref='eqScrollBoard'/> <dv-scroll-board :config="config" style="width:575px;height:380px" ref='eqScrollBoard'/>
</div> </div>
@ -19,24 +19,26 @@ export default {
}, },
data() { data() {
return { return {
// config:{}
config: { config: {
header: ['序号', '设备名称', '设备编码','设备状态','是否故障'], header: ['序号', '设备名称', '设备编码','设备状态','是否故障'],
// headerHeight: '17',
headerBGC: 'rgba(32, 55, 96, 0.8)', headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)', oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)', evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60, 150, 190], columnWidth: [60],
align: ['center'], align: ['center'],
data: [ data: [
[1, '四大线3小线铺纸机', 'EQ20240110130909000255', '正常', '否'], [1, '设备1', '行1列3', '', ''],
[2, '四大线2小线铺纸机', 'EQ20240110130848000254', '正常', '否'], [2, '设备2', '行2列3', '', ''],
[3, '四大线1小线铺纸机', 'EQ20240110130832000253', '正常', '否'], [3, '设备3', '行3列3', '', ''],
[4, '12线下片台', 'EQ20240110130817000252', '正常', '否'], [4, '设备4', '行4列3', '', ''],
[5, '11线下片台', ' EQ20240110130743000250', '正常', '否'], [5, '设备5', '行5列3', '', ''],
[6, '10线下片台', ' EQ20240110130743000250', '正常', '否'], [6, '设备6', '行6列3', '', ''],
[7, '4大线五区自动连线柜', 'EQ20240110130731000249', '正常', '否'], [7, '设备7', '行7列3', '', ''],
[8, '四大线四区2小线清洗机', 'EQ20240110112716000248', '正常', '否'], [8, '设备8', '行8列3', '', ''],
[9, '四大线四区1小线清洗机', 'EQ20240110112700000247', '正常', '否'], [9, '设备9', '行9列3', '', ''],
[10, '4大线四区自动连线柜', 'EQ20240110112646000246', '正常', '否'] [10, '设备10', '行10列3', '', '']
], ],
rowNum: 10 rowNum: 10
} }
@ -44,20 +46,20 @@ export default {
}, },
mounted(){ mounted(){
}, },
// watch:{ watch:{
// sjgEquipment: { sjgEquipment: {
// handler(newVal, oldVal) { handler(newVal, oldVal) {
// let outArr = this.sjgEquipment.map((item, index) => [ let outArr = this.sjgEquipment.map((item, index) => [
// index+1, index+1,
// item.name, item.name,
// item.code, item.code,
// item.status, item.status,
// item.error? '': '' item.error? '是': '否'
// ]); ]);
// this.config.data = outArr this.config.data = outArr
// this.$refs['eqScrollBoard'].updateRows(outArr) this.$refs['eqScrollBoard'].updateRows(outArr)
// } }
// } }
// } }
} }
</script> </script>

View File

@ -1,9 +1,11 @@
<template> <template>
<Container name="产线产量及良品率" size="large" style=""> <div style="flex: 1;">
<div class="chart" style="height: 370px; margin-top: 8px;"> <Container name="产线产量及良品率" size="small" style="">
<NumRateChart /> <div class="chart" style="height: 370px; margin-top: 8px;">
</div> <NumRateChart />
</Container> </div>
</Container>
</div>
</template> </template>
<script> <script>
import Container from '../components/Container'; import Container from '../components/Container';

View File

@ -26,19 +26,19 @@
display: grid; display: grid;
grid-template-rows: 462px; grid-template-rows: 462px;
"> ">
<EnergyMonitoring /> <WorkOrderMonitoring />
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import WorkOrderMonitoring from './WorkOrderMonitoring';
import EqAlarm from './EqAlarm' import EqAlarm from './EqAlarm'
import DefectSum from './DefectSum' import DefectSum from './DefectSum'
import EnergyMonitoring from './EnergyMonitoring';
export default { export default {
name: 'TopThree', name: 'TopThree',
components: { EqAlarm, DefectSum, EnergyMonitoring }, components: { EqAlarm, DefectSum, WorkOrderMonitoring },
props: {}, props: {},
data() { data() {
return {}; return {};

View File

@ -1,13 +1,14 @@
<template> <template>
<Container name="工单监控" size="middle" style=""> <div style="flex: 1;">
<div style="padding: 5px 10px;" class="WOMonitoring"> <Container name="工单监控" size="small" style="">
<dv-scroll-board :config="config" style="width:900px;height:380px" ref='worderScrollBoard'/> <div style="padding: 5px 10px;">
</div> <dv-scroll-board :config="config" style="width:575px;height:380px" ref='worderScrollBoard'/>
</Container> </div>
</Container>
</div>
</template> </template>
<script> <script>
import Container from '../components/Container.vue'; import Container from '../components/Container.vue';
import { formatDate } from '@/utils'
export default { export default {
name: 'WorkOrderMonitoring', name: 'WorkOrderMonitoring',
components: { Container }, components: { Container },
@ -19,19 +20,29 @@ export default {
data() { data() {
return { return {
config: { config: {
header: ['序号', '工单名称', '规格','产线','工单状态', '计划完成时间','计划产量','实际产量'], header: ['序号', '工单名称', '规格','产线','工单状态', '计划完成时间', '计划产量', '实际产量'],
// headerHeight: '17',
headerBGC: 'rgba(32, 55, 96, 0.8)', headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)', oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)', evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60, 120, 120, 60, 100, 150], columnWidth: [60, 120, 80, 60, 80, 120, 120, 120],
align: ['center'], align: ['center'],
data: [], data: [
rowNum:10 [1, '工单1', '行1列3', '', '','','',''],
[2, '工单2', '行2列3', '', '','','',''],
[3, '工单3', '行3列3', '', '','','',''],
[4, '工单4', '行4列3', '', '','','',''],
[5, '工单5', '行5列3', '', '','','',''],
[6, '工单6', '行6列3', '', '','','',''],
[7, '工单7', '行7列3', '', '','','',''],
[8, '工单8', '行8列3', '', '','','',''],
[9, '工单9', '行9列3', '', '','','',''],
[10, '工单10', '行10列3', '', '','','','']
],
rowNum: 10
} }
} }
}, },
methods:{
},
watch:{ watch:{
order: { order: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
@ -40,8 +51,8 @@ export default {
item.name, item.name,
item.specifications, item.specifications,
item.lines, item.lines,
['等待','已下发','已完成'][item.status], item.status,
formatDate(item.planFinishTime), item.planFinishTime,
item.planQuantity, item.planQuantity,
item.planAssignQuantity item.planAssignQuantity
]); ]);

View File

@ -11,14 +11,14 @@
style=" style="
flex: 1; flex: 1;
display: grid; display: grid;
grid-template-columns: 2fr 3fr 3fr; grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: auto; grid-template-rows: auto;
gap: 8px; gap: 8px;
padding: 4px; padding: 4px;
margin-bottom: 6px; margin-bottom: 6px;
"> ">
<ShadowRect <ShadowRect
style="grid-row: 1/3 ; flex-direction: column; justify-content: center"> style="grid-row: 1 / 3; flex-direction: column; justify-content: center">
<span <span
style=" style="
font-size: 16px; font-size: 16px;
@ -34,7 +34,6 @@
line-height: 1.55; line-height: 1.55;
text-align: center; text-align: center;
letter-spacing: 1px; letter-spacing: 1px;
color: #3ce8ff
"> ">
{{energyInfo.elecQty1}}kwh {{energyInfo.elecQty1}}kwh
</span> </span>
@ -52,7 +51,7 @@
"> ">
<p style="margin: 0; line-height: inherit">水耗量</p> <p style="margin: 0; line-height: inherit">水耗量</p>
</div> </div>
<span style="font-size: 16px; line-height: 1.24; flex: 1.3;color: #3ce8ff">{{energyInfo.waterQty}}</span> <span style="font-size: 16px; line-height: 1.24; flex: 1">{{energyInfo.waterQty}}</span>
</ShadowRect> </ShadowRect>
<ShadowRect> <ShadowRect>
@ -67,7 +66,7 @@
"> ">
<p style="margin: 0; line-height: inherit">天然气I</p> <p style="margin: 0; line-height: inherit">天然气I</p>
</div> </div>
<span style="font-size: 16px; line-height: 1.24; flex: 1.3;color: #3ce8ff">{{sumGasInfo.sumGas1Now}}</span> <span style="font-size: 16px; line-height: 1.24; flex: 1">{{sumGasInfo.sumGas1Now}}</span>
</ShadowRect> </ShadowRect>
<ShadowRect> <ShadowRect>
@ -82,7 +81,7 @@
"> ">
<p style="margin: 0; line-height: inherit">电耗量</p> <p style="margin: 0; line-height: inherit">电耗量</p>
</div> </div>
<span style="font-size: 16px; line-height: 1.24; flex: 1.3;color: #3ce8ff">{{energyInfo.elecQty2}}kwh</span> <span style="font-size: 16px; line-height: 1.24; flex: 1">{{energyInfo.elecQty2}}kwh</span>
</ShadowRect> </ShadowRect>
<ShadowRect> <ShadowRect>
@ -97,7 +96,7 @@
"> ">
<p style="margin: 0; line-height: inherit">天然气II</p> <p style="margin: 0; line-height: inherit">天然气II</p>
</div> </div>
<span style="font-size: 16px; line-height: 1.24; flex: 1.3;color: #3ce8ff">{{sumGasInfo.sumGas2Now}}</span> <span style="font-size: 16px; line-height: 1.24; flex: 1">{{sumGasInfo.sumGas2Now}}</span>
</ShadowRect> </ShadowRect>
</div> </div>
</template> </template>

View File

@ -16,7 +16,7 @@
style=" style="
font-size: 20px; font-size: 20px;
line-height: 1.24; line-height: 1.24;
flex: 1; flex: 1.2;
text-align: right; text-align: right;
padding-right: 8px; padding-right: 8px;
letter-spacing: 3px; letter-spacing: 3px;
@ -30,12 +30,12 @@
style=" style="
font-size: 20px; font-size: 20px;
line-height: 1.5; line-height: 1.5;
flex: 1; flex: 1.2;
text-align: right; text-align: right;
padding-right: 8px; padding-right: 8px;
letter-spacing: 3px; letter-spacing: 3px;
"> ">
<p style="margin: 0; line-height: inherit">氮氧化物</p> <p style="margin: 0; line-height: inherit">一氧化氮</p>
<p style="margin: 0; line-height: inherit">排放浓度</p> <p style="margin: 0; line-height: inherit">排放浓度</p>
</div> </div>
<span style="font-size: 20px; line-height: 1.24; flex: 1">{{exhaustGasInfo?.NOX_float ? (Number(exhaustGasInfo.NOX_float)).toFixed(2) : ''}}mg/</span> <span style="font-size: 20px; line-height: 1.24; flex: 1">{{exhaustGasInfo?.NOX_float ? (Number(exhaustGasInfo.NOX_float)).toFixed(2) : ''}}mg/</span>
@ -46,7 +46,7 @@
style=" style="
font-size: 20px; font-size: 20px;
line-height: 1.5; line-height: 1.5;
flex: 1; flex: 1.2;
text-align: right; text-align: right;
padding-right: 8px; padding-right: 8px;
letter-spacing: 3px; letter-spacing: 3px;
@ -62,7 +62,7 @@
style=" style="
font-size: 20px; font-size: 20px;
line-height: 1.24; line-height: 1.24;
flex: 1; flex: 1.2;
text-align: right; text-align: right;
padding-right: 8px; padding-right: 8px;
letter-spacing: 1px; letter-spacing: 1px;
@ -95,11 +95,11 @@
justify-content: space-between; justify-content: space-between;
"> ">
<SelectorBtnGroup <SelectorBtnGroup
:options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']" @emitFun='toggleType' :active='chartType'/> :options="['氧气含量', '二氧化硫', '一氧化氮', '颗粒物']" @emitFun='toggleType' :active='chartType'/>
<SelectorBtnGroup :options="['日', '周', '月', '年']" @emitFun='toggleDate' :active='chartTime' /> <SelectorBtnGroup :options="['日', '周', '月', '年']" @emitFun='toggleDate' :active='chartTime' />
</div> </div>
<div class="chart" style="height: 250px;margin-top: 10px;"> <div class="chart" style="height: 250px;margin-top: 10px;">
<FlueGasChart :chartType='chartType' :chartTime='chartTime'/> <FlueGas :chartType='chartType' :chartTime='chartTime'/>
</div> </div>
</div> </div>
</Container> </Container>
@ -112,7 +112,7 @@ import ShadowRect from '../components/ShadowRect.vue';
import KilnLine from '../components/line'; import KilnLine from '../components/line';
// import Switcher from '../components/Switcher'; // import Switcher from '../components/Switcher';
import SelectorBtnGroup from '../components/SelectorBtnGroup'; import SelectorBtnGroup from '../components/SelectorBtnGroup';
import FlueGasChart from '../components/FlueGasChart'; import FlueGas from '../components/FlueGas';
export default { export default {
name: 'GasHandle', name: 'GasHandle',
@ -121,7 +121,7 @@ export default {
ShadowRect, ShadowRect,
KilnLine, KilnLine,
SelectorBtnGroup, SelectorBtnGroup,
FlueGasChart, FlueGas,
}, },
props: {}, props: {},
data() { data() {

View File

@ -1,10 +1,12 @@
<template> <template>
<Container name="产线当日缺陷分类" size="middle"> <div style="flex: 1;">
<SelectorBtnGroup class="typeToggle" :options="['Y61', 'Y62', 'Y63', 'Y64', 'Y65']" @emitFun='toggleType' :active='chartType' /> <Container name="产线当日缺陷分类" size="small">
<div class="chart" style="height: 375px; margin-top: 8px;"> <SelectorBtnGroup class="typeToggle" :options="['Y61', 'Y62', 'Y63', 'Y64', 'Y65']" @emitFun='toggleType' :active='chartType' />
<DefectClassChart :chartType='chartType'/> <div class="chart" style="height: 370px; margin-top: 8px;">
</div> <DefectClassChart :chartType='chartType'/>
</Container> </div>
</Container>
</div>
</template> </template>
<script> <script>
import Container from '../components/Container'; import Container from '../components/Container';

View File

@ -1,5 +1,5 @@
<template> <template>
<div style="flex: 1;" class="orderContainer"> <div style="flex: 1;">
<Container name="订单完成情况" size="small" style=""> <Container name="订单完成情况" size="small" style="">
<div style="padding: 5px 10px;"> <div style="padding: 5px 10px;">
<dv-scroll-board :config="config" style="width:575px;height:230px" ref='orderScrollBoard'/> <dv-scroll-board :config="config" style="width:575px;height:230px" ref='orderScrollBoard'/>
@ -9,7 +9,6 @@
</template> </template>
<script> <script>
import Container from '../components/Container' import Container from '../components/Container'
import { formatDate } from '@/utils'
export default { export default {
name: 'OrderStatus', name: 'OrderStatus',
components: { Container }, components: { Container },
@ -22,45 +21,41 @@ export default {
return { return {
config: { config: {
header: ['上线时间', '客户名称', '规格','完成度'], header: ['上线时间', '客户名称', '规格','完成度'],
// headerHeight: '17',
headerBGC: 'rgba(32, 55, 96, 0.8)', headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)', oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)', evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [155, 180, 150], // columnWidth: [60],
data: [], align: ['center'],
data: [
['2023-12-01', '客户1', '行1列3', ''],
['2023-12-01', '客户2', '行2列3', ''],
['2023-12-01', '客户3', '行3列3', ''],
['2023-12-01', '客户4', '行4列3', ''],
['2023-12-01', '客户5', '行5列3', ''],
['2023-12-01', '客户6', '行6列3', ''],
['2023-12-01', '客户7', '行7列3', ''],
['2023-12-01', '客户8', '行8列3', ''],
['2023-12-01', '客户9', '行9列3', ''],
['2023-12-01', '客户10', '行10列3', '']
],
rowNum: 6 rowNum: 6
} }
} }
}, },
mounted() {},
watch:{ watch:{
order: { order: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
let outArr = this.order.map((item) => [ let outArr = this.order.map((item) => [
formatDate(item.planStartTime) || '', item.startProduceTime,
`<span title=${item.customerName || ''}>${item.customerName || ''}</span>`, item.name,
`<span title=${item.specifications || ''}>${item.specifications || ''}</span>`, item.specifications,
`<span style="display:inline-block;width:40px;">${item.completeRate?(item.completeRate*100).toFixed(2)+'%':'0%'}</span> item.completeRate
<div class="box" style="display:inline-block;">
<div class="bg"></div>
<div class="rount" style="-webkit-transform:rotate(${(item.completeRate?(item.completeRate*100).toFixed(2):0)<=50?3.6*item.completeRate*100:180}deg)"></div>
<div class="bg2"></div>
<div style="${item.completeRate*100>50?'display:block;-webkit-transform:rotate('+3.6*(item.completeRate*100-50)+'deg)':'display:none;'}" class="rount2"></div>
</div>`
]); ]);
this.config.data = outArr this.config.data = outArr
this.$refs['orderScrollBoard'].updateRows(outArr) this.$refs['orderScrollBoard'].updateRows(outArr)
} }
} }
} }
} }
</script> </script>
<style lang='scss'>
.orderContainer {
.box{width:16px;height:12px;margin:1px auto;position:relative;}
.box div{position:absolute;top:0;left:0;border-radius:50%;height:16px;width:16px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;}
.box .bg{border:silver 4px solid}
.box .bg2{border:silver 4px solid;clip:rect(0,8px,20px,0);}
.box .rount{border:#47FF27 4px solid;clip:rect(0,8px,24px,0);-webkit-transform:rotate(0deg);}
.box .rount2{border:#47FF27 4px solid;clip:rect(0,40px,40px,8px);-webkit-transform:rotate(0deg);display:none}
}
</style>

View File

@ -1,5 +1,6 @@
<template> <template>
<Container name="本日生产良品率" size="large"> <div style="flex: 2;">
<Container name="本日生产良品率" size="small">
<div style="padding: 5px 10px;"> <div style="padding: 5px 10px;">
<dv-scroll-board :config="config" style="width:575px;height:230px" ref='yieldRateScrollBoard'/> <dv-scroll-board :config="config" style="width:575px;height:230px" ref='yieldRateScrollBoard'/>
</div> </div>
@ -26,6 +27,7 @@
</div> </div>
</div> </div>
</Container> </Container>
</div>
</template> </template>
<script> <script>
import Container from '../components/Container' import Container from '../components/Container'
@ -51,7 +53,14 @@ export default {
oddRowBGC: 'rgba(32, 55, 96, 0.8)', oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)', evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60], columnWidth: [60],
data: [], align: ['center'],
data: [
[1, '产线1', '49%', '', ''],
[2, '产线2', '49%', '', ''],
[3, '产线3', '49%', '', ''],
[4, '产线4', '49%', '', ''],
[5, '产线5', '49%', '', '']
],
rowNum: 5 rowNum: 5
}, },
chartType:false, chartType:false,
@ -63,10 +72,10 @@ export default {
handler(newVal, oldVal) { handler(newVal, oldVal) {
let outArr = this.yieldRateTable.map((item) => [ let outArr = this.yieldRateTable.map((item) => [
item.lineName, item.lineName,
item.first?(item.first*100).toFixed(2)+'%':'0.00%', item.first,
item.second?(item.second*100).toFixed(2)+'%':'0.00%', item.second,
item.product?(item.product*100).toFixed(2)+'%':'0.00%', item.product,
item.waste?(item.waste*100).toFixed(2)+'%':'0.00%' item.waste
]); ]);
this.config.data = outArr this.config.data = outArr
this.$refs['yieldRateScrollBoard'].updateRows(outArr) this.$refs['yieldRateScrollBoard'].updateRows(outArr)

View File

@ -156,26 +156,6 @@ export default {
}; };
this.resetForm('form'); this.resetForm('form');
}, },
deleteHandle(id, name, index, data) {
this.$confirm(`确认要删除产线名为${data.productionLineName}的数据项?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':

View File

@ -157,26 +157,6 @@ export default {
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },
deleteHandle(id, name, index, data) {
this.$confirm(`确认要删除序号为${index}的数据项?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
async getDict() { async getDict() {
// //
const res = await getHotMaterialAllList(); const res = await getHotMaterialAllList();

View File

@ -150,26 +150,6 @@ export default {
// //
const res = await getList(); const res = await getList();
this.formConfig[1].selectOptions = res.data; this.formConfig[1].selectOptions = res.data;
},
deleteHandle(id, name, index,data) {
this.$confirm(`确认要删除报废原因名为${data.content}的数据项?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
}, },
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {

View File

@ -143,26 +143,6 @@ export default {
}); });
} }
}, },
deleteHandle(id, name, index, data) {
this.$confirm(`确认要删除序号为${index}的数据项?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
// //
getDict() { getDict() {
getWorkOrderList().then((res) => { getWorkOrderList().then((res) => {

View File

@ -134,26 +134,6 @@ export default {
this.listQuery.total = response.data.total; this.listQuery.total = response.data.total;
this.dataListLoading = false; this.dataListLoading = false;
}); });
},
deleteHandle(id, name, index) {
this.$confirm(`确认要删除报废类型名为${name}的数据项?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
}, },
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {

View File

@ -310,27 +310,7 @@ export default {
// }, // },
}, },
methods: { methods: {
/** 获取搜索栏的产线列表 */ /** 获取搜索栏的产线列表 */
deleteHandle(id, name, index, data) {
this.$confirm(`确认要删除序号为${index}的数据项?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
getProductLineList() { getProductLineList() {
this.$axios('/base/core-work-order/listbyfilter').then((response) => { this.$axios('/base/core-work-order/listbyfilter').then((response) => {
this.searchBarFormConfig[0].selectOptions = response.data.map( this.searchBarFormConfig[0].selectOptions = response.data.map(

View File

@ -94,7 +94,7 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
}; };
const onWsMessage = (event) => { const onWsMessage = (event) => {
const jsonStr = event.data; const jsonStr = event.data;
// writeToScreen("onWsMessage接收到服务器的数据: ", jsonStr); writeToScreen("onWsMessage接收到服务器的数据: ", jsonStr);
this.messageCallback(jsonStr); this.messageCallback(jsonStr);
}; };
const onWsClose = (event) => { const onWsClose = (event) => {