1.修改设备类型
2.调整首页报表
3.调整设备状态列表
main
liuhr 2 years ago
parent 9c380a5fa0
commit f5858de707

@ -557,4 +557,18 @@ export default class helper {
return textStatus; return textStatus;
}; };
// 设备类型Homegrown 国产炉 Import 进口炉)
static getEquipmentType = (val: any) => {
let text = '';
switch (val) {
case 'Homegrown':
text = '国产炉';
break;
case 'Import':
text = '进口炉';
break;
}
return text;
};
} }

@ -65,8 +65,8 @@
<q-separator /> <q-separator />
<q-card-section style="width: 90vw" class="scroll"> <q-card-section style="width: 90vw" class="scroll">
<q-table class="my-sticky-header-column-table" :rows="tableData" row-key="id" separator="cell" <q-table class="my-sticky-header-column-table" :rows="tableData" row-key="id" separator="cell"
:loading="loading" :columns="columns" v-model:pagination="pagination" :table-style="{ height: '500px' }" :loading="loading" :columns="columns" v-model:pagination="pagination"
@request="onRequest" flat bordered> :table-style="{ height: '500px' }" @request="onRequest" flat bordered>
<template v-slot:body="props"> <template v-slot:body="props">
<q-tr :props="props" class="tr_hover"> <q-tr :props="props" class="tr_hover">
<q-td style="font-size: 16px;" key="index" :props="props">{{ props.rowIndex + 1 <q-td style="font-size: 16px;" key="index" :props="props">{{ props.rowIndex + 1
@ -79,8 +79,10 @@
}}</q-td> }}</q-td>
<q-td key="equipmentCode" :props="props">{{ props.row.equipmentCode }}</q-td> <q-td key="equipmentCode" :props="props">{{ props.row.equipmentCode }}</q-td>
<q-td key="equipmentName" :props="props">{{ props.row.equipmentName }}</q-td> <q-td key="equipmentName" :props="props">{{ props.row.equipmentName }}</q-td>
<q-td key="equipmentType" :props="props">{{ props.row.equipmentType }}</q-td> <q-td key="equipmentType" :props="props">{{ helper.getEquipmentType(props.row.equipmentType)
<q-td key="actionType" :props="props">{{ helper.getActionType(props.row.actionType) }}</q-td> }}</q-td>
<q-td key="actionType" :props="props">{{ helper.getActionType(props.row.actionType)
}}</q-td>
<q-td key="pointCode" :props="props"> <q-td key="pointCode" :props="props">
{{ props.row.pointCode }} {{ props.row.pointCode }}
</q-td> </q-td>
@ -177,9 +179,8 @@ const pagination = ref(new Pagination(new DeivcePointSearchEntity()));
// //
const deviceInfo = ref(); const deviceInfo = ref();
const equipmentTypeList = ref([ const equipmentTypeList = ref([
{ label: 'Ionbond', value: 'Ionbond' }, { label: '国产炉', value: 'Homegrown' },
{ label: 'Balzers', value: 'Balzers' }, { label: '进口炉', value: 'Import' }
{ label: 'CemeCon', value: 'CemeCon' },
]) ])
const activatedList = ref([ const activatedList = ref([
{ label: '启用', value: true }, { label: '启用', value: true },

@ -35,8 +35,8 @@
<q-input dense label="设备名称" outlined v-model="equipmentSearchEntity.equipmentName" /> <q-input dense label="设备名称" outlined v-model="equipmentSearchEntity.equipmentName" />
</div> </div>
<div class="col-xl-2 col-lg-2 col-sm-12"> <div class="col-xl-2 col-lg-2 col-sm-12">
<q-select dense outlined v-model="equipmentSearchEntity.equipmentType" :options="equipmentTypeList" <q-select dense outlined v-model="equipmentSearchEntity.equipmentType"
emit-value map-options label="设备类型" /> :options="equipmentTypeList" emit-value map-options label="设备类型" />
</div> </div>
<div class="col-xl-2 col-lg-2 col-sm-12"> <div class="col-xl-2 col-lg-2 col-sm-12">
<q-select dense outlined v-model="equipmentSearchEntity.activated" :options="activatedList" <q-select dense outlined v-model="equipmentSearchEntity.activated" :options="activatedList"
@ -60,7 +60,8 @@
}}</q-td> }}</q-td>
<q-td key="equipmentCode" :props="props">{{ props.row.equipmentCode }}</q-td> <q-td key="equipmentCode" :props="props">{{ props.row.equipmentCode }}</q-td>
<q-td key="equipmentName" :props="props">{{ props.row.equipmentName }}</q-td> <q-td key="equipmentName" :props="props">{{ props.row.equipmentName }}</q-td>
<q-td key="equipmentType" :props="props">{{ props.row.equipmentType }}</q-td> <q-td key="equipmentType" :props="props">{{ helper.getEquipmentType(props.row.equipmentType)
}}</q-td>
<q-td key="state" :props="props"> <q-td key="state" :props="props">
<q-badge style="font-size: 18px;height:30px;" <q-badge style="font-size: 18px;height:30px;"
:color="helper.getEquipmentState(props.row.state).color" :color="helper.getEquipmentState(props.row.state).color"
@ -99,9 +100,8 @@ const emit = defineEmits(['returnEquipment']);
// //
const equipmentTypeList = ref([ const equipmentTypeList = ref([
{ label: 'Ionbond', value: 'Ionbond' }, { label: '国产炉', value: 'Homegrown' },
{ label: 'Balzers', value: 'Balzers' }, { label: '进口炉', value: 'Import' }
{ label: 'CemeCon', value: 'CemeCon' },
]) ])
const activatedList = ref([ const activatedList = ref([
{ label: '启用', value: true }, { label: '启用', value: true },

@ -39,7 +39,8 @@
{ label: '否', value: false }]" emit-value map-options label="是否报警" /> { label: '否', value: false }]" emit-value map-options label="是否报警" />
</div> </div>
<div class="col-xl-6 col-lg-12 col-sm-12"> <div class="col-xl-6 col-lg-12 col-sm-12">
<q-input class="text-h6" type="number" outlined v-model="addOrEditFormData.ordrNo" label="排序" <q-input class="text-h6" type="number" outlined v-model="addOrEditFormData.ordrNo"
label="排序"
:rules="[(val) => (val != null && val != undefined && val != '') || '请填写排序']"> :rules="[(val) => (val != null && val != undefined && val != '') || '请填写排序']">
<template v-slot:append> <template v-slot:append>
<q-btn icon="info" round flat color="info" @click="cfgClick"> <q-btn icon="info" round flat color="info" @click="cfgClick">
@ -84,9 +85,8 @@ const emit = defineEmits(['refresh']);
const isAlarmFlag = ref(false); const isAlarmFlag = ref(false);
const equipmentTypeList = ref([ const equipmentTypeList = ref([
{ label: 'Ionbond', value: 'Ionbond' }, { label: '国产炉', value: 'Homegrown' },
{ label: 'Balzers', value: 'Balzers' }, { label: '进口炉', value: 'Import' }
{ label: 'CemeCon', value: 'CemeCon' },
]) ])
const activatedList = ref([ const activatedList = ref([
@ -95,9 +95,8 @@ const activatedList = ref([
]) ])
const remarkList = ref([ const remarkList = ref([
{ label: 'Ionbond', value: 'Ionbond' }, { label: '第一', value: '第一' },
{ label: 'Balzers', value: 'Balzers' }, { label: '第二', value: '第二' }
{ label: 'CemeCon', value: 'CemeCon' }
]) ])
const modelList = ref([ const modelList = ref([

@ -57,7 +57,7 @@
props.row.equipmentName props.row.equipmentName
}}</q-td> }}</q-td>
<q-td style="font-size: 16px;" key="equipmentType" :props="props">{{ <q-td style="font-size: 16px;" key="equipmentType" :props="props">{{
props.row.equipmentType helper.getEquipmentType(props.row.equipmentType)
}}</q-td> }}</q-td>
<q-td style="font-size: 16px;" key="state" :props="props"><q-badge <q-td style="font-size: 16px;" key="state" :props="props"><q-badge
style="font-size: 18px;height:30px;" style="font-size: 18px;height:30px;"
@ -82,9 +82,11 @@
:color="props.row.activated == true ? 'green' : 'red'" :color="props.row.activated == true ? 'green' : 'red'"
:label="props.row.activated == true ? '启用' : '停用'" /> :label="props.row.activated == true ? '启用' : '停用'" />
</q-td> </q-td>
<q-td style="font-size: 16px;" key="remark" :props="props">{{ props.row.remark }}</q-td> <q-td style="font-size: 16px;" key="remark" :props="props">{{ props.row.remark
}}</q-td>
<q-td key="action" :props="props" style="width: 100px"> <q-td key="action" :props="props" style="width: 100px">
<q-btn round flat push color="info" icon="edit" @click="addOrEditForm(props.row)"> <q-btn round flat push color="info" icon="edit"
@click="addOrEditForm(props.row)">
<q-tooltip content-class="bg-amber text-black shadow-4" :offset="[10, 10]" <q-tooltip content-class="bg-amber text-black shadow-4" :offset="[10, 10]"
content-style="font-size: 12px">编辑这条数据</q-tooltip> content-style="font-size: 12px">编辑这条数据</q-tooltip>
</q-btn> </q-btn>
@ -121,9 +123,8 @@ import helper from 'src/Utils/helper';
// //
const equipmentTypeList = ref([ const equipmentTypeList = ref([
{ label: 'Ionbond', value: 'Ionbond' }, { label: '国产炉', value: 'Homegrown' },
{ label: 'Balzers', value: 'Balzers' }, { label: '进口炉', value: 'Import' }
{ label: 'CemeCon', value: 'CemeCon' },
]) ])
const activatedList = ref([ const activatedList = ref([
{ label: '启用', value: true }, { label: '启用', value: true },

@ -105,7 +105,7 @@
}}</q-td> }}</q-td>
</q-tr> </q-tr>
</template> </template>
</q-table> --> </q-table> -->
<table style="width: 100%; "> <table style="width: 100%; ">
<thead> <thead>
@ -116,8 +116,8 @@
</tr> </tr>
</thead> </thead>
</table> </table>
<vue3-seamless-scroll :list="list" :step="0.3" :hover="true" :limitScrollNum="18" <vue3-seamless-scroll :list="list" :step="0.3" :hover="true"
class="scroll"> :limitScrollNum="18" class="scroll">
<table style="width: 100%;"> <table style="width: 100%;">
<tbody> <tbody>
<tr v-for="(item, index) in list" :key="index" class="item"> <tr v-for="(item, index) in list" :key="index" class="item">
@ -257,23 +257,19 @@ const getEquipmentAlarmList = () => {
// //
const EquipmentStateView = () => { const EquipmentStateView = () => {
let All: any = []; let All: any = [];
let Balzers: any = []; let Homegrown: any = [];
let CemeCon: any = []; let Import: any = [];
let Ionbond: any = [];
// //
equipmentRecordApi.getEquipmentStateView().then((res: any) => { equipmentRecordApi.getEquipmentStateView().then((res: any) => {
res.forEach((item: any) => { res.forEach((item: any) => {
if (item.equipmentType == 'All') { if (item.equipmentType == 'All') {
All.push(item.run, item.stop, item.alarm); All.push(item.run, item.stop, item.alarm);
} else if (item.equipmentType == 'Balzers') { } else if (item.equipmentType == 'Homegrown') {
Balzers.push(item.run, item.stop, item.alarm); Homegrown.push(item.run, item.stop, item.alarm);
} }
else if (item.equipmentType == 'CemeCon') { else if (item.equipmentType == 'Import') {
CemeCon.push(item.run, item.stop, item.alarm); Import.push(item.run, item.stop, item.alarm);
}
else if (item.equipmentType == 'Ionbond') {
Ionbond.push(item.run, item.stop, item.alarm);
} }
}); });
@ -297,7 +293,7 @@ const EquipmentStateView = () => {
} }
}, },
{ {
subtext: 'Balzers', subtext: '国产炉',
left: '75%', left: '75%',
top: '45%', top: '45%',
textAlign: 'center', textAlign: 'center',
@ -308,7 +304,7 @@ const EquipmentStateView = () => {
} }
}, },
{ {
subtext: 'CemeCon', subtext: '进口炉',
left: '25%', left: '25%',
top: '90%', top: '90%',
textAlign: 'center', textAlign: 'center',
@ -317,17 +313,6 @@ const EquipmentStateView = () => {
fontSize: 18, fontSize: 18,
fontWeight: 'bold' fontWeight: 'bold'
} }
},
{
subtext: 'Ionbond',
left: '75%',
top: '90%',
textAlign: 'center',
subtextStyle: {
color: '#000',
fontSize: 18,
fontWeight: 'bold'
}
} }
], ],
legend: { legend: {
@ -344,16 +329,14 @@ const EquipmentStateView = () => {
}, },
dataset: { dataset: {
source: { source: {
// product: ['All', 'Balzers', 'CemeCon', 'Ionbond'], // product: ['All', 'Homegrown', 'Import'],
product: ['运行', '停机', '报警'], product: ['运行', '停机', '报警'],
All, All,
Balzers, Homegrown,
CemeCon, Import,
Ionbond,
// All: [11, 21, 31], // All: [11, 21, 31],
// Balzers: [41, 51, 61], // Homegrown: [41, 51, 61],
// CemeCon: [71, 81, 91], // Import: [71, 81, 91]
// Ionbond: [10, 11, 12]
} }
}, },
series: [ series: [
@ -384,7 +367,7 @@ const EquipmentStateView = () => {
center: ['75%', '28%'], center: ['75%', '28%'],
encode: { encode: {
itemName: 'product', itemName: 'product',
value: 'Balzers' value: 'Homegrown'
}, },
label: { label: {
normal: { normal: {
@ -403,7 +386,7 @@ const EquipmentStateView = () => {
center: ['25%', '73%'], center: ['25%', '73%'],
encode: { encode: {
itemName: 'product', itemName: 'product',
value: 'CemeCon' value: 'Import'
}, },
label: { label: {
normal: { normal: {
@ -415,25 +398,6 @@ const EquipmentStateView = () => {
// formatter: '{@[3]} \n {d} %' // formatter: '{@[3]} \n {d} %'
} }
} }
},
{
type: 'pie',
radius: '38%',
center: ['75%', '73%'],
encode: {
itemName: 'product',
value: 'Ionbond'
},
label: {
normal: {
fontSize: '16px',
color: '#fff',
show: true,
position: 'inside', // outseide
formatter: '{@[4]} 台'
// formatter: '{@[4]} \n {d} %'
}
}
} }
] ]
}; };
@ -787,42 +751,12 @@ const EquipmentRecordOEEMonthTotal = () => {
// //
const EquipmentRecordFurnaceMonthTotal = () => { const EquipmentRecordFurnaceMonthTotal = () => {
let Balzers: any = [];
let CemeCon: any = [];
let Ionbond: any = [];
let month: any = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; let month: any = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
let result: Array<object> = []; let result: Array<object> = [];
// //
equipmentRecordApi.getEquipmentRecordFurnaceMonthTotal().then((res: any) => { equipmentRecordApi.getEquipmentRecordFurnaceMonthTotal().then((res: any) => {
// month.forEach((m: any) => { debugger
// res.forEach((item: any) => {
// if (item.totalMonth == m) {
// if (item.equipmentType == 'Balzers') {
// Balzers.push(item.furnaceNum);
// }
// if (item.equipmentType == 'CemeCon') {
// CemeCon.push(item.furnaceNum);
// }
// if (item.equipmentType == 'Ionbond') {
// Ionbond.push(item.furnaceNum);
// }
// } else {
// if (item.equipmentType == 'Balzers') {
// Balzers.push(0);
// }
// if (item.equipmentType == 'CemeCon') {
// CemeCon.push(0);
// }
// if (item.equipmentType == 'Ionbond') {
// Ionbond.push(0);
// }
// }
// })
// })
// let grouped_data = lodash.groupBy(res, 'totalMonth');
// console.log(grouped_data);
var obj = {}, newArr = []; var obj = {}, newArr = [];
res.forEach(function (item, suffix) { res.forEach(function (item, suffix) {
@ -844,15 +778,13 @@ const EquipmentRecordFurnaceMonthTotal = () => {
newArr.forEach((item: any) => { newArr.forEach((item: any) => {
let CemeCon = item.filter(c => { let CemeCon = item.filter(c => {
return c.equipmentType == 'CemeCon' return c.equipmentType == 'Homegrown'
}) })
let Balzers = item.filter(b => { return b.equipmentType == 'Balzers' }) let Balzers = item.filter(b => { return b.equipmentType == 'Import' })
let Ionbond = item.filter(i => { return i.equipmentType == 'Ionbond' })
result.push({ result.push({
product: item[0].totalMonth + '月', product: item[0].totalMonth + '月',
CemeCon: CemeCon[0].furnaceNum, Homegrown: CemeCon[0].furnaceNum,
Balzers: Balzers[0].furnaceNum, Import: Balzers[0].furnaceNum,
Ionbond: Ionbond[0].furnaceNum,
}) })
}) })
@ -876,7 +808,7 @@ const EquipmentRecordFurnaceMonthTotal = () => {
// left: 0, // left: 0,
right: '2%', right: '2%',
top: 1, top: 1,
data: ['Balzers', 'CemeCon', 'Ionbond'] data: ['Homegrown', 'Import']
}, },
// grid: { // grid: {
// top: '5%', // top: '5%',
@ -934,33 +866,13 @@ const EquipmentRecordFurnaceMonthTotal = () => {
} }
}, },
dataset: { dataset: {
dimensions: ['product', 'Balzers', 'CemeCon', 'Ionbond'], dimensions: ['product', 'Homegrown', 'Import'],
source: result source: result
}, },
series: [ series: [
{ {
name: 'Balzers', name: 'Homegrown',
type: 'bar',
// data: Balzers,
itemStyle: {
normal: {
label: {
color: '#000',
position: 'top', //
show: true // 线
},
}
},
tooltip: {
valueFormatter: function (value: any) {
return value + ' 次';
}
}
},
{
name: 'CemeCon',
type: 'bar', type: 'bar',
// data: CemeCon,
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
@ -977,9 +889,8 @@ const EquipmentRecordFurnaceMonthTotal = () => {
} }
}, },
{ {
name: 'Ionbond', name: 'Import',
type: 'bar', type: 'bar',
// data: Ionbond,
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {

@ -75,7 +75,7 @@
<q-td style="font-size: 16px;" key="equipmentName" :props="props">{{ <q-td style="font-size: 16px;" key="equipmentName" :props="props">{{
props.row.equipmentName }}</q-td> props.row.equipmentName }}</q-td>
<q-td style="font-size: 16px;" key="equipmentType" :props="props">{{ <q-td style="font-size: 16px;" key="equipmentType" :props="props">{{
props.row.equipmentType }}</q-td> helper.getEquipmentType(props.row.equipmentType) }}</q-td>
<q-td style="font-size: 16px;" key="state" :props="props"> <q-td style="font-size: 16px;" key="state" :props="props">
<q-badge style="font-size: 18px;height:30px;" <q-badge style="font-size: 18px;height:30px;"
:color="helper.getEquipmentState(props.row.state).color" :color="helper.getEquipmentState(props.row.state).color"
@ -102,7 +102,7 @@ import { onMounted, ref } from 'vue';
import { Notify, Screen, date, Platform, exportFile, Loading, Dialog, QSpinnerIos } from 'quasar'; import { Notify, Screen, date, Platform, exportFile, Loading, Dialog, QSpinnerIos } from 'quasar';
import * as XLSX from 'XLSX' import * as XLSX from 'XLSX'
import { Pagination, cconvert } from 'src/api/class'; import { Pagination, cconvert } from 'src/api/class';
import helper from 'src/Utils/helper' import helper from 'src/Utils/helper';
import { EquipmentSearchEntity } from 'src/api/equipment/model/equipment' import { EquipmentSearchEntity } from 'src/api/equipment/model/equipment'
import { equipmentApi } from 'src/api/equipment/equipmentApi'; import { equipmentApi } from 'src/api/equipment/equipmentApi';
import { EquipmentRecord } from 'src/api/equipmentRecord/model/equipmentRecord' import { EquipmentRecord } from 'src/api/equipmentRecord/model/equipmentRecord'
@ -508,7 +508,7 @@ const exportTable = () => {
index + 1, index + 1,
item.equipmentCode, item.equipmentCode,
item.equipmentName, item.equipmentName,
item.equipmentType, helper.getEquipmentType(item.equipmentType),
helper.getEquipmentState(item.state).text, helper.getEquipmentState(item.state).text,
item.startTime, item.startTime,
item.endTime, item.endTime,

@ -20,13 +20,13 @@
<q-td key="total" :props="props">{{ props.row.total }}</q-td> <q-td key="total" :props="props">{{ props.row.total }}</q-td>
</q-tr> </q-tr>
</template> </template>
</q-table> --> </q-table> -->
<div class="col-xs-6 col-xl-6 col-lg-6 col-sm-6"> <div class="col-xs-5 col-xl-5 col-lg-5 col-sm-5">
<q-card class="my-card"> <q-card class="my-card">
<q-card-section class="row q-pa-xs"> <q-card-section class="row q-pa-xs">
<template v-for="(item, index) in BalzersList" v-bind:key="item"> <template v-for="(item, index) in list1" v-bind:key="item">
<div class="q-pa-xs col-xs-4 col-xl-4 col-lg-4 col-sm-4"> <div class="q-pa-xs col-xs-6 col-xl-6 col-lg-6 col-sm-6">
<q-card :class="'my-card no-shadow ' + helper.getEquipmentStateColor(item.state)" <q-card :class="'my-card no-shadow ' + helper.getEquipmentStateColor(item.state)"
:bordered="item.id != ''" :flat="item.id == ''" style="height:70px;"> :bordered="item.id != ''" :flat="item.id == ''" style="height:70px;">
<q-card-section> <q-card-section>
@ -49,31 +49,25 @@
</div> </div>
</template> </template>
</q-card-section> </q-card-section>
<!-- <q-card-section> <q-card-section>
<div class="text-h6 text-weight-bold text-center ">四涂层室</div> <div class="text-h6 text-weight-bold text-center "></div>
</q-card-section> --> </q-card-section>
</q-card> </q-card>
</div> </div>
<div class="col-xs-2 col-xl-2 col-lg-2 col-sm-2"> <div class="col-xs-2 col-xl-2 col-lg-2 col-sm-2">
<q-card class="my-card"> <q-card class="my-card" style="background-color: #73cb9b;">
<q-card-section class="row q-pa-xs"> <q-card-section class="row q-pa-xs">
<template v-for="(item, index) in list2" v-bind:key="item"> <template v-for="(item, index) in guodao" v-bind:key="item">
<div class="q-pa-xs col-xs-12 col-xl-12 col-lg-12 col-sm-12"> <div class="q-pa-xs col-xs-12 col-xl-12 col-lg-12 col-sm-12">
<q-card :class="'my-card no-shadow ' + helper.getEquipmentStateColor(item.state)" <q-card :class="'my-card no-shadow ' + helper.getEquipmentStateColor(item.state)"
:bordered="item.id != ''" :flat="item.id == ''" style="height:70px;"> :flat="item.id == ''" style="height:70px;background-color: #73cb9b;">
<q-card-section class="col-xs-3 col-xl-3 col-lg-4 col-sm-12 "> <q-card-section class="col-xs-3 col-xl-3 col-lg-4 col-sm-12 ">
<div class="row q-col-gutter-md items-center"> <div class="row q-col-gutter-md items-center">
<div class="col-xl-9 col-lg-9 col-sm-9"> <div class="col-xl-9 col-lg-9 col-sm-9">
<div class="text-h5 text-weight-bold "> {{ item.equipmentName }}
</div>
</div> </div>
<div class="col-xl-2 col-lg-2 col-sm-2"> <div class="col-xl-2 col-lg-2 col-sm-2">
<q-btn flat round color="dark" icon="visibility" v-show="item.id != ''"
@click="openView(item)">
<q-tooltip class="text-body2" :offset="[10, 10]">
查看设备详情
</q-tooltip>
</q-btn>
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
@ -81,49 +75,15 @@
</div> </div>
</template> </template>
</q-card-section> </q-card-section>
<!-- <q-card-section> <q-card-section>
<div class=" text-h6 text-weight-bold text-center ">第三涂层室</div> <div class=" text-h6 text-weight-bold text-center ">过道</div>
</q-card-section> -->
</q-card>
</div>
<div class=" col-xs-4 col-xl-4 col-lg-4 col-sm-4">
<q-card class="my-card">
<q-card-section class="row q-pa-xs">
<template v-for="(item, index) in list3" v-bind:key="item">
<div class="q-pa-xs col-xs-6 col-xl-6 col-lg-6 col-sm-6">
<q-card :class="'my-card no-shadow ' + helper.getEquipmentStateColor(item.state)"
:bordered="item.id != ''" :flat="item.id == ''" style="height:70px;">
<q-card-section class="col-xs-3 col-xl-3 col-lg-4 col-sm-12 ">
<div class="row q-col-gutter-md items-center">
<div class="col-xl-9 col-lg-9 col-sm-9">
<div class="text-h5 text-weight-bold ">
{{ item.equipmentName }}
</div>
</div>
<div class="col-xl-2 col-lg-2 col-sm-2">
<q-btn flat round color="dark" icon="visibility"
v-show="item.state != ''" @click="openView(item)">
<q-tooltip class="text-body2" :offset="[10, 10]">
查看设备详情
</q-tooltip>
</q-btn>
</div>
</div>
</q-card-section>
</q-card>
</div>
</template>
</q-card-section> </q-card-section>
<!-- <q-card-section>
<div class="text-h6 text-weight-bold text-center ">
第二涂层室</div>
</q-card-section> -->
</q-card> </q-card>
</div> </div>
<!-- <div class=" col-xs-4 col-xl-4 col-lg-4 col-sm-4"> <div class=" col-xs-5 col-xl-5 col-lg-5 col-sm-5">
<q-card class="my-card"> <q-card class="my-card">
<q-card-section class="row q-pa-xs"> <q-card-section class="row q-pa-xs">
<template v-for="(item, index) in list4" v-bind:key="item"> <template v-for="(item, index) in list2" v-bind:key="item">
<div class="q-pa-xs col-xs-6 col-xl-6 col-lg-6 col-sm-6 "> <div class="q-pa-xs col-xs-6 col-xl-6 col-lg-6 col-sm-6 ">
<q-card :class="'my-card no-shadow ' + helper.getEquipmentStateColor(item.state)" <q-card :class="'my-card no-shadow ' + helper.getEquipmentStateColor(item.state)"
:bordered="item.id != ''" :flat="item.id == ''" style="height:70px;"> :bordered="item.id != ''" :flat="item.id == ''" style="height:70px;">
@ -149,11 +109,11 @@
</template> </template>
</q-card-section> </q-card-section>
<q-card-section> <q-card-section>
<div class="text-h6 text-weight-bold text-center ">一涂层室 <div class="text-h6 text-weight-bold text-center ">
</div> </div>
</q-card-section> </q-card-section>
</q-card> </q-card>
</div> --> </div>
</div> </div>
</q-card-section> </q-card-section>
@ -204,10 +164,9 @@ import { useScreenStore } from 'src/stores/useScreenStore'
// ]) // ])
const screenStore = useScreenStore(); const screenStore = useScreenStore();
const BalzersList = ref(); const guodao = ref(11);
const list1 = ref();
const list2 = ref(); const list2 = ref();
const list3 = ref();
const list4 = ref();
const equipmentSearchEntity = ref(new EquipmentSearchEntity()); const equipmentSearchEntity = ref(new EquipmentSearchEntity());
let equipmentListTimer: NodeJS.Timer | null = null; // let equipmentListTimer: NodeJS.Timer | null = null; //
@ -228,8 +187,6 @@ onBeforeUnmount(() => {
const EquipmentList = () => { const EquipmentList = () => {
let Coating1 = [] as any let Coating1 = [] as any
let Coating2 = [] as any let Coating2 = [] as any
let Coating3 = [] as any
let BalzersCoating = [] as any
let templateJSON = { let templateJSON = {
id: '', id: '',
equipmentCode: null, equipmentCode: null,
@ -244,21 +201,17 @@ const EquipmentList = () => {
// ,:Run:Stop:Alarm // ,:Run:Stop:Alarm
equipmentApi.getEquipmentList(equipmentSearchEntity.value).then((res: any) => { equipmentApi.getEquipmentList(equipmentSearchEntity.value).then((res: any) => {
res.forEach((item: any) => { res.forEach((item: any) => {
if (item.remark == '第一涂层室') { if (item.remark == '第一') {
Coating1.push(item); Coating1.push(item);
} else if (item.remark == 'CemeCon') { } else if (item.remark == '第二') {
Coating2.push(item); Coating2.push(item);
} else if (item.remark == 'Ionbond') {
Coating3.push(item);
} else if (item.remark == 'Balzers') {
BalzersCoating.push(item);
} }
}); });
// //
Coating1.sort((a: any, b: any) => a.ordrNo - b.ordrNo); Coating1.sort((a: any, b: any) => a.ordrNo - b.ordrNo);
let Coating1Val = [] as any let Coating1Val = [] as any
for (let i = 1; i <= 14; i++) { for (let i = 1; i <= 22; i++) {
for (let j = 0; j < Coating1.length; j++) { for (let j = 0; j < Coating1.length; j++) {
if (Coating1[j].ordrNo == i) { if (Coating1[j].ordrNo == i) {
Coating1Val.push(Coating1[j]) Coating1Val.push(Coating1[j])
@ -270,16 +223,12 @@ const EquipmentList = () => {
} }
} }
} }
// var obj4 = JSON.parse(JSON.stringify(screen3_4)); //JSONJSON list1.value = Coating1Val //obj4
// obj4.splice(0, 0, templateJSON);
// obj4.splice(4, 0, templateJSON);
// obj4.splice(10, 0, templateJSON, templateJSON);
list4.value = Coating1Val //obj4
// //
Coating2.sort((a: any, b: any) => a.ordrNo - b.ordrNo); Coating2.sort((a: any, b: any) => a.ordrNo - b.ordrNo);
let Coating2Val = [] as any let Coating2Val = [] as any
for (let i = 1; i <= 18; i++) { for (let i = 1; i <= 22; i++) {
for (let j = 0; j < Coating2.length; j++) { for (let j = 0; j < Coating2.length; j++) {
if (Coating2[j].ordrNo == i) { if (Coating2[j].ordrNo == i) {
Coating2Val.push(Coating2[j]) Coating2Val.push(Coating2[j])
@ -299,54 +248,12 @@ const EquipmentList = () => {
// obj3.splice(7, 0, templateJSON); // obj3.splice(7, 0, templateJSON);
// obj3.splice(10, 0, templateJSON); // obj3.splice(10, 0, templateJSON);
// obj3.splice(11, 0, templateJSON); // obj3.splice(11, 0, templateJSON);
list3.value = Coating2Val //obj3 debugger
for (let i = 1; Coating2Val.length < 22; i++) {
debugger
// Coating2Val.push(templateJSON)
Coating3.sort((a: any, b: any) => a.ordrNo - b.ordrNo);
let Coating3Val = [] as any
for (let i = 1; i <= 9; i++) {
for (let j = 0; j < Coating3.length; j++) {
if (Coating3[j].ordrNo == i) {
Coating3Val.push(Coating3[j])
Coating3.splice(j, 1);
break
} else {
Coating3Val.push(templateJSON)
break
}
}
}
// var obj2 = JSON.parse(JSON.stringify(screen3_2)); //JSONJSON
// obj2.splice(1, 0, templateJSON);
// obj2.splice(2, 0, templateJSON);
// obj2.splice(5, 0, templateJSON, templateJSON, templateJSON);
// obj2.splice(9, 0, templateJSON, templateJSON);
// obj2.splice(11, 0, templateJSON);
list2.value = Coating3Val //obj2
// Balzers
BalzersCoating.sort((a: any, b: any) => a.ordrNo - b.ordrNo);
let BalzersCoatingVal = [] as any
for (let i = 1; i <= 27; i++) {
for (let j = 0; j < BalzersCoating.length; j++) {
if (BalzersCoating[j].ordrNo == i) {
BalzersCoatingVal.push(BalzersCoating[j])
BalzersCoating.splice(j, 1);
break
} else {
BalzersCoatingVal.push(templateJSON)
break
}
}
} }
list2.value = Coating2Val //obj3
// var obj1 = JSON.parse(JSON.stringify(screen3_1)); //JSONJSON
// obj1.splice(0, 0, templateJSON, templateJSON);
// obj1.splice(3, 0, templateJSON);
// obj1.splice(5, 0, templateJSON);
BalzersList.value = BalzersCoatingVal // obj1
}) })
} }

@ -77,7 +77,7 @@
<q-td style="font-size: 16px;" key="equipmentName" :props="props">{{ <q-td style="font-size: 16px;" key="equipmentName" :props="props">{{
props.row.equipmentName }}</q-td> props.row.equipmentName }}</q-td>
<q-td style="font-size: 16px;" key="equipmentType" :props="props">{{ <q-td style="font-size: 16px;" key="equipmentType" :props="props">{{
props.row.equipmentType helper.getEquipmentType(props.row.equipmentType)
}}</q-td> }}</q-td>
<q-td style="font-size: 16px;" key="furnaceNum" :props="props">{{ <q-td style="font-size: 16px;" key="furnaceNum" :props="props">{{
props.row.furnaceNum props.row.furnaceNum
@ -101,6 +101,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { Notify, Screen, date, Platform, exportFile, Loading, Dialog, QSpinnerIos } from 'quasar'; import { Notify, Screen, date, Platform, exportFile, Loading, Dialog, QSpinnerIos } from 'quasar';
import helper from 'src/Utils/helper';
import * as XLSX from 'XLSX' import * as XLSX from 'XLSX'
import { Pagination, cconvert } from 'src/api/class'; import { Pagination, cconvert } from 'src/api/class';
import { EquipmentRecord, EquipmentNoTimeRecord } from 'src/api/equipmentRecord/model/equipmentRecord' import { EquipmentRecord, EquipmentNoTimeRecord } from 'src/api/equipmentRecord/model/equipmentRecord'
@ -320,7 +321,7 @@ const exportTable = () => {
index + 1, index + 1,
item.equipmentCode, item.equipmentCode,
item.equipmentName, item.equipmentName,
item.equipmentType, helper.getEquipmentType(item.equipmentType),
item.furnaceNum, item.furnaceNum,
item.totalRunningTime, item.totalRunningTime,
item.totalAlarmTime, item.totalAlarmTime,

Loading…
Cancel
Save